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?q=fetch&page=707&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 9060 results for "fetch"(1363ms)

isMyWebsiteDownmain.tsx2 matches

@healeycodes•Updated 11 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

uptimemain.tsx2 matches

@devinmcgloin•Updated 11 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

uptimemain.tsx2 matches

@sumukh•Updated 11 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

blob_adminmain.tsx2 matches

@charlypoly•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

honoExamplemain.tsx1 match

@qqyule•Updated 11 months ago
8 return c.json(body);
9});
10export default app.fetch;

uploadImagemain.tsx2 matches

@qqyule•Updated 11 months ago
10 image,
11 );
12 const data = await (await fetch(await getUploadURL(), {
13 "body": fd,
14 "method": "POST",
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",

isMyWebsiteDownmain.tsx3 matches

@pressjeremy•Updated 11 months ago
1import { email } from "https://esm.town/v/std/email?v=11";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export default async () => {
9 let reason: string;
10 try {
11 const res = await fetch(URL);
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 }
142const app = new Hono();
143app.get("/", Time_Blindness_Loud_Calendar_via_iOS_shortcuts);
144export default app.fetch;
15 }),
16 );
17 const dataReq = await fetch(`https://api.pinata.cloud/pinning/pinFileToIPFS`, {
18 method: "POST",
19 headers: {
27 console.log("Making pin list request");
28
29 const req = await fetch(
30 "https://api.pinata.cloud/data/pinList?metadata[keyvalues]={\"level\":{\"value\":\"200\",\"op\":\"eq\"}}",
31 {

asciiNycCamerasmain.tsx4 matches

@maxm•Updated 11 months ago
35 document.getElementById("message").style.display = "none";
36 document.getElementById("close-btn").style.display = "flex";
37 await fetchImage(id);
38 };
39
85 });
86 };
87 let resp = await fetch("https://webcams.nyctmc.org/cameras/graphql", {
88 "headers": {
89 "content-type": "application/json",
190 async (c) =>
191 new Response(
192 (await fetch(
193 "https://gist.githubusercontent.com/maxmcd/fdbc8197e877ca052a55982cb85f14c9/raw/0b1191bdf1f5e8c8cc2b7deab2a1f934ffc4dc14/nyc.json",
194 )).body,
283 });
284});
285export default app.fetch;

proxyFetch2 file matches

@vidar•Updated 1 hour ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 16 hours ago