Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=fetch&page=11&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 9988 results for "fetch"(561ms)

Empressjobs.ts4 matches

@R0ses_rose•Updated 16 hours ago
10 return c.json(jobs);
11 } catch (error) {
12 console.error("Error fetching jobs:", error);
13 return c.json({ error: "Failed to fetch jobs" }, 500);
14 }
15});
30 return c.json(job);
31 } catch (error) {
32 console.error("Error fetching job:", error);
33 return c.json({ error: "Failed to fetch job" }, 500);
34 }
35});
236// try {
237// // Check if repository exists and is accessible
238// const repoCheckResponse = await fetch(`https://api.github.com/repos/${githubRepo}`, {
239// headers: {
240// "Authorization": `token ${githubToken}`,
301
302// const url = `https://api.github.com/search/issues?${params.toString()}`;
303// const response = await fetch(url, {
304// headers: {
305// "Authorization": `token ${githubToken}`,
343// if (!slackToken) return;
344
345// const response = await fetch("https://slack.com/api/chat.postMessage", {
346// method: "POST",
347// headers: {

todo-appApp.tsx3 matches

@stevekrouse•Updated 16 hours ago
30 const addTodo = async (text: string) => {
31 try {
32 const response = await fetch("/api/todos", {
33 method: "POST",
34 headers: {
56 if (!todo) return;
57
58 const response = await fetch(`/api/todos/${id}`, {
59 method: "PUT",
60 headers: {
79 const deleteTodo = async (id: string) => {
80 try {
81 const response = await fetch(`/api/todos/${id}`, {
82 method: "DELETE",
83 });

todo-appindex.ts3 matches

@stevekrouse•Updated 16 hours ago
24 return todos || [];
25 } catch (error) {
26 console.error("Error fetching todos:", error);
27 return [];
28 }
141 };
142
143 // If user is logged in, fetch their todos
144 if (email) {
145 initialData.userData = { email };
157
158// Export the handler with LastLogin
159export default lastlogin(app.fetch);

basic-auth-demobasic-auth-demo-for-api.ts6 matches

@stevekrouse•Updated 17 hours ago
60 <h2 class="text-xl font-semibold mb-2">Try the API:</h2>
61 <p class="mb-2">The API endpoint requires basic authentication.</p>
62 <button id="fetchSecret" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded">
63 Fetch Secret
64 </button>
65 <div id="result" class="mt-4 p-3 bg-gray-100 rounded hidden"></div>
78
79 <script>
80 document.getElementById('fetchSecret').addEventListener('click', async () => {
81 const resultEl = document.getElementById('result');
82 resultEl.classList.remove('hidden');
83
84 try {
85 const response = await fetch('/api/secret');
86
87 if (response.ok) {
119});
120
121// Export the fetch handler for Val Town
122export default app.fetch;

deldeldelrandom-subcurrent-post.ts5 matches

@ashryanio•Updated 17 hours ago
2 * Random Subcurrent Blog Post Selector
3 *
4 * This Val fetches the RSS feed from Astoria Tech's Subcurrent blog,
5 * selects a random post, and displays its metadata.
6 */
18export default async function (req: Request): Promise<Response> {
19 try {
20 // Fetch the RSS feed
21 const response = await fetch(
22 "https://astoria-tech.github.io/subcurrent-astro/rss.xml"
23 );
25 if (!response.ok) {
26 throw new Error(
27 `Failed to fetch RSS feed: ${response.status} ${response.statusText}`
28 );
29 }
172 <div class="max-w-2xl mx-auto bg-white p-6 rounded-lg shadow-md">
173 <h1 class="text-2xl font-bold text-red-700 mb-4">Error</h1>
174 <p class="mb-4">Sorry, something went wrong while fetching or processing the RSS feed:</p>
175 <div class="bg-red-50 border-l-4 border-red-500 p-4 mb-4">
176 <p class="text-red-700">${

deleteLatervinyl-ui.ts2 matches

@ashryanio•Updated 17 hours ago
131
132 try {
133 console.log('Fetching vinyl release...');
134 const response = await fetch('https://vinyl-generator-api.web.val.run');
135 console.log('Response status:', response.status);
136

deleteLatervinyl-generator-ui.ts2 matches

@ashryanio•Updated 17 hours ago
132
133 try {
134 console.log('Fetching vinyl release...');
135 const response = await fetch('https://vinyl-generator-api.web.val.run');
136 console.log('Response status:', response.status);
137
hubspot

hubspothubspot-perplexity-report3 matches

@charmaine•Updated 17 hours ago
114 const contactId = event.objectId.toString();
115
116 const propertiesToFetch = ["email", "firstname", "lastname"];
117 const contactDetailsSdk = await hubspotClient.crm.contacts.basicApi.getById(
118 contactId,
119 propertiesToFetch,
120 );
121 const contact = contactDetailsSdk as unknown as HubSpotContact;
184 };
185
186 const perplexityResponse = await fetch("https://api.perplexity.ai/chat/completions", {
187 method: "POST",
188 headers: {
hubspot

hubspot.cursorrules3 matches

@charmaine•Updated 17 hours ago
239
240 // Inject data to avoid extra round-trips
241 const initialData = await fetchInitialData();
242 const dataScript = `<script>
243 window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
286
2875. **API Design:**
288 - `fetch` handler is the entry point for HTTP vals
289 - Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`
290
291

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 2 days ago

proxyFetch2 file matches

@vidar•Updated 4 days ago