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//%22$%7Bconfig.siteUrl%7D/%22?q=fetch&page=5&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 18997 results for "fetch"(733ms)

consistmain.ts3 matches

@know•Updated 1 day ago
251 }
252
253 const response = await fetch(\`/api/run-agent/\${agentName}\`, {
254 method: 'POST',
255 headers: { 'Content-Type': 'application/json' },
382app.get("/", (c) => {
383 const sourceUrl = new URL(c.req.url);
384 // Ensure the URL is clean for the script's fetch calls (no path, no query)
385 const baseUrl = `https://${sourceUrl.hostname}`;
386 return c.html(generateHtml(baseUrl));
387});
388
389export default app.fetch;

statusmonitor2 matches

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

transit-proxymain.ts1 match

@easrng•Updated 1 day ago
5 const url = new URL(req.url);
6 url.hostname = "bgtfs.transitapp.com";
7 return fetch(url);
8}

tanstack-basicindex.ts1 match

@nbbaier•Updated 1 day ago
15app.get("/src/**/*", (c) => serveFile(c.req.path, import.meta.url));
16
17export default app.fetch;

untitled-5100main.ts5 matches

@chatgot•Updated 1 day ago
67 // Debug mode
68 if (mode === "debug") {
69 const response = await fetch(
70 `${baseUrl}?view=mTeam&view=mSettings&scoringPeriodId=2`,
71 {
112 `${baseUrl}?view=mMatchup&view=mMatchupScore&view=mTeam&view=mSettings&view=mBoxscore&view=mScoreboard&view=mRoster&view=mLiveScoring&scoringPeriodId=${targetWeek}`;
113
114 const response = await fetch(apiUrl, {
115 method: "GET",
116 headers: {
287 const apiUrl = `${baseUrl}?view=mTeam&view=mStandings&view=mSettings`;
288
289 const response = await fetch(apiUrl, {
290 method: "GET",
291 headers: {
353 `${baseUrl}?view=mRoster&view=mTeam&view=mLiveScoring&view=mMatchupScore&scoringPeriodId=${currentWeek}&teamId=${actualTeamId}`;
354
355 const response = await fetch(apiUrl, {
356 method: "GET",
357 headers: {
423 } catch (error) {
424 return Response.json({
425 error: "Failed to fetch fantasy data",
426 details: error.message,
427 });

guesty2homeitmain.ts1 match

@bernardo•Updated 1 day ago
13 console.log("📥 Incoming payload:", bodyText);
14
15 const resp = await fetch(APP_SCRIPT_URL, {
16 method: "POST",
17 headers: {

webgpu_1main.tsx1 match

@saolsen•Updated 1 day ago
4
5async function main() {
6 const shader = await (await fetch(`${module_path}/shader.wgsl`)).text();
7
8 const adapter = await navigator.gpu?.requestAdapter();

betterstackmain.tsx4 matches

@vov•Updated 1 day ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3const HF_TOKEN =
16 );
17
18 const jwtResponse = await fetch(
19 `https://huggingface.co/api/spaces/altox/asd/jwt?expiration=${expirationDate}&include_pro_status=true`,
20 {
30 console.log({ token });
31
32 // await fetch(
33 // "https://uptime.betterstack.com/api/v2/monitors/3276488",
34 // {
46 // );
47
48 const response = await fetch(
49 "https://uptime.betterstack.com/api/v2/monitors/3276488",
50 {

wa-honomain.tsx1 match

@nbbaier•Updated 1 day ago
64app.get("/**/*", (c) => serveFile(c.req.path));
65
66export default app.fetch;

cerebras_coderindex.ts1 match

@rrostt•Updated 1 day ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

FetchBasic2 file matches

@bengold•Updated 2 weeks ago

fetch1 file match

@raify•Updated 2 weeks ago