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/$%7Bsuccess?q=fetch&page=662&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 8976 results for "fetch"(1918ms)

graphQLYogamain.tsx1 match

@dthyresson•Updated 9 months ago
45});
46
47export default yoga.fetch;

graphQLYogaDeferAndStreammain.tsx1 match

@dthyresson•Updated 9 months ago
95});
96
97export default yoga.fetch;

graphQLYogaWithSubscriptionsmain.tsx1 match

@dthyresson•Updated 9 months ago
91});
92
93export default yoga.fetch;

compileAndUploadTinygoWasmREADME.md1 match

@kora•Updated 9 months ago
34
35import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
36const resp = await fetch("https://maxm-wasmBlobHost.web.val.run/jpxqvyy5tphiwehzklmioklpkpz4gpzs.wasm");
37const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
38export default async function(req: Request): Promise<Response> {

compileAndUploadTinygoWasmmain.tsx2 matches

@kora•Updated 9 months ago
42})();
43
44let resp = await fetch("https://maxm-wasmBlobHost.web.val.run", {
45 method: "POST",
46 headers: {
57
58import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
59const resp = await fetch("${url}");
60const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
61export default async function(req: Request): Promise<Response> {

coffeeReptilemain.tsx1 match

@tempguy•Updated 9 months ago
1import { blob } from "https://esm.town/v/std/blob?v=12";
2export default async function(interval: Interval) {
3 await fetch("https://tempguy-scarletsole.web.val.run/refresh");
4 const date = new Date();
5 await blob.setJSON("turnstileCron", { ptime: date.getTime(), ntime: interval.delay + interval.lastRunAt.getTime() });

tealPheasantmain.tsx9 matches

@tempguy•Updated 9 months ago
2const url =
3 "https://streambucket.net/playvideo.php?video_id=S0dpVVFEbWV3ZDBBNGI3QldBPT0=&server_id=42&token=S0dLWFR6NkcxTUllNHIzSlRGb0tTaXFTVStiSHNRdkpNcXFsOWtJamljYU5nQ1JId1dac2hVeTN5VGkrRG1ZN2FiSUs0ZU9MUEo1Sk9XcEhUTHJLOUt0cGc0aXZvTGhDUDhRV1IyMGR3Qnl4d0YyNERsQWRhOXBvK2tQanNvODBzc3FOQnVDRjl2UUJDVjJURjFqNjNER202TzJNNUxzcEtnPT0=";
4const req = await fetch(
5 "https://streambucket.net/playvideo.php?video_id=S0dpVVFEbWV3ZDBBNGI3QldBPT0=&server_id=42&token=S0dLWFR6NkcxTUllNHIzSlRGb0tTaXFTVStiSHNRdkpNcXFsOWtJamljYU5nQ1JId1dac2hVeTN5VGkrRG1ZN2FiSUs0ZU9MUEo1Sk9XcEhUTHJLOUt0cGc0aXZvTGhDUDhRV1IyMGR3Qnl4d0YyNERsQWRhOXBvK2tQanNvODBzc3FOQnVDRjl2UUJDVjJURjFqNjNER202TzJNNUxzcEtnPT0=",
6);
25 "Alt-Used": "streambucket.net",
26 "Upgrade-Insecure-Requests": "1",
27 "Sec-Fetch-Dest": "iframe",
28 "Sec-Fetch-Mode": "navigate",
29 "Sec-Fetch-Site": "same-origin",
30 "Sec-Fetch-User": "?1",
31 "Priority": "u=4",
32 "Pragma": "no-cache",
67
68 try {
69 // Perform the fetch request
70 const response = await fetch(url, {
71 method: "POST",
72 headers: headers,
74 });
75
76 // Await and log the result of the fetch request
77 const result = await response.status;
78 console.log(result);
79 } catch (error) {
80 console.error("Error fetching combination:", combination, error);
81 }
82 }

maroonBandicootmain.tsx3 matches

@tempguy•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2export default async function(request: Request) {
3 const url = new URL(request.url);
4 const h = url.searchParams.get("tdestination");
5 if (h) {
6 const resp = await fetch(decodeURIComponent(url.searchParams.get("tdestination")), {
7 method: request.method,
8 body: request.body,
13 }
14 else {
15 const resp = await fetch(decodeURIComponent(url.searchParams.get("destination")), {
16 method: request.method,
17 body: request.body,

glideREADME.md1 match

@dvdsgl•Updated 9 months ago
9## Examples
10
11Simplest case, use `runIngest` with an async `fetch`:
12
13```ts

isMyWebsiteDownmain.tsx2 matches

@rkda•Updated 9 months ago
9 let reason: string;
10 try {
11 const res = await fetch(URL, { redirect: "follow" });
12 if (res.status !== 200) {
13 reason = `(status code: ${res.status})`;
15 }
16 } catch (e) {
17 reason = `couldn't fetch: ${e}`;
18 ok = false;
19 }

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago