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=1&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 14433 results for "fetch"(1265ms)

TownieMessages.tsx9 matches

@valdottown•Updated 23 mins ago
256 </>
257 );
258 case "fetch":
259 return (
260 <Details
269 summary={(
270 <>
271 <div>fetch:</div>
272 <div>{args?.valPath}</div>
273 <div>{args?.urlPath || "/"}</div>
275 )}>
276 {result?.type === "success" ? (
277 <div className="fetch-result">
278 <div className="fetch-header">
279 <span className={`status-badge ${result.data.status >= 200 && result.data.status < 300 ? 'success' :
280 result.data.status >= 300 && result.data.status < 400 ? 'redirect' :
284 <span className="response-time">{result.data.responseTime}ms</span>
285 </div>
286 <div className="fetch-section">
287 <h4>Headers</h4>
288 <pre className="fetch-headers">{JSON.stringify(result.data.headers, null, 2)}</pre>
289 </div>
290 <div className="fetch-section">
291 <h4>Response Body</h4>
292 <pre className="fetch-body">
293 {typeof result.data.body === 'object'
294 ? JSON.stringify(result.data.body, null, 2)
298 </div>
299 ) : (
300 <div className="fetch-error">
301 <h4>Error</h4>
302 <pre>{result?.message || "Unknown error"}</pre>

HelloWorld2main.tsx1 match

@wolf•Updated 23 mins ago
6 });
7
8export default app.fetch;

untitled-2285main.tsx1 match

@stevekrouse•Updated 23 mins ago
7});
8
9export default app.fetch;

statusmonitor2 matches

@helge•Updated 1 hour ago
18 const start = performance.now();
19 try {
20 res = await fetch(url);
21 end = performance.now();
22 status = res.status;
28 } catch (e) {
29 end = performance.now();
30 reason = `couldn't fetch: ${e}`;
31 ok = false;
32 }

kebede-and-ben-testApp.tsx2 matches

@bmitchinson•Updated 1 hour ago
16
17 try {
18 const response = await fetch('/api/game', {
19 method: 'POST',
20 headers: {
47 const moveData: MoveRequest = { position };
48
49 const response = await fetch(`/api/game/${game.id}/move`, {
50 method: 'PUT',
51 headers: {

kebede-and-ben-testindex.ts1 match

@bmitchinson•Updated 1 hour ago
27});
28
29export default app.fetch;

statuspushover2 matches

@helge•Updated 1 hour ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Send a pushover message.
10 console.log("Tokens:", { PUSHOVER_TOKEN, PUSHOVER_USER_KEY }); // Check if env vars are set
11
12 const response = await fetch("https://api.pushover.net/1/messages.json", {
13 method: "POST",
14 headers: {

brokenLinkCrawlerurlGetter.tsx2 matches

@willthereader•Updated 2 hours ago
14 visited.add(sourceURL);
15
16 const response = await fetch(linkList.original.homepage);
17 // console.log(response);
18 const html = await response.text();
43 // }
44
45 // const response = await fetch(linkObject.homepage);
46 // // console.log(response);
47 // const html = await response.text();

slimifymain.tsx1 match

@affan•Updated 2 hours ago
65})
66
67export default app.fetch;

stravachatsendDailyBrief.ts1 match

@katzenj•Updated 4 hours ago
135 const lastSunday = today.startOf("week").minus({ days: 1 });
136
137 // Fetch relevant memories using the utility function
138 const memories = await getRelevantMemories();
139

testWeatherFetcher1 file match

@sjaskeprut•Updated 10 hours ago

weatherFetcher1 file match

@sjaskeprut•Updated 10 hours ago