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/$%7Bart_info.art.src%7D?q=fetch&page=691&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 8649 results for "fetch"(2531ms)

isMyWebsiteDownmain.tsx2 matches

@michaellatman•Updated 1 year ago
16
17 try {
18 const res = await fetch(URL, { redirect: "follow" });
19 if (res.status !== 200) {
20 reason = `(status code: ${res.status})`;
22 }
23 } catch (e) {
24 reason = `couldn't fetch: ${e}`;
25 ok = false;
26 }

watchAnthropicCircuitsBlogmain.tsx2 matches

@jsomers•Updated 1 year ago
2import { blob } from "https://esm.town/v/std/blob?v=11";
3import { email } from "https://esm.town/v/std/email?v=11";
4import { fetch } from "https://esm.town/v/std/fetch";
5
6export const watchWebsite = async () => {
7 const url = "https://transformer-circuits.pub";
8 const newHtml = await fetch(url).then(r => r.text());
9
10 const key = "watch:" + url;

MusicAPI2main.tsx3 matches

@nishui•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export default async function(req: Request): Promise<Response> {
20 try {
21 [data1, data2] = await Promise.all([
22 fetch(encodedUri),
23 fetch(`https://music.163.com/api/song/media?id=${id}`),
24 ]);
25

uploadTo0x0main.tsx1 match

@easrng•Updated 1 year ago
4 formData.append("file", blob, name);
5 formData.append("expires", "1");
6 const response = await fetch("https://0x0.st", {
7 method: "POST",
8 body: formData,

upload_urlmain.tsx1 match

@stevekrouse•Updated 1 year ago
4 formData.append("file", file);
5
6 const response = await fetch("https://file.io", {
7 method: "POST",
8 body: formData,

uploadTo0x0main.tsx1 match

@stevekrouse•Updated 1 year ago
4 formData.append("file", blob, name);
5 formData.append("expires", "1");
6 const response = await fetch("https://0x0.st", {
7 method: "POST",
8 body: formData,

compress_image_demomain.tsx1 match

@stevekrouse•Updated 1 year ago
18});
19
20export default app.fetch;

oak_demomain.tsx1 match

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

GistGPT_Clientmain.tsx3 matches

@weaverwhale•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/hono/jsx */
2import { fetch } from "https://esm.town/v/std/fetch";
3import { Marked } from "npm:@ts-stack/markdown";
4import { Hono } from "npm:hono";
55 const url = c.req.query("url");
56 // https://www.val.town/v/weaverwhale/GistGPT
57 const answer = await fetch(`https://weaverwhale-gistgpt.web.val.run/gist?url=${url}`).then(
58 (res) => res.text(),
59 );
83});
84
85export default app.fetch;

PriestGPTClientmain.tsx3 matches

@mjweaver01•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/hono/jsx */
2import { fetch } from "https://esm.town/v/std/fetch";
3import { Hono } from "npm:hono";
4
41 const verse = c.req.param("verse");
42 // https://www.val.town/v/mjweaver01/PriestGPT
43 const answer = await fetch(`https://mjweaver01-priestgpt.web.val.run/ask/${encodeURI(verse)}`).then(
44 (res) => res.text(),
45 );
64});
65
66export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago