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/?q=fetch&page=1136&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 13344 results for "fetch"(1832ms)

isMyWebsiteDownmain.tsx2 matches

@ronlats•Updated 12 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 }

createTursoProxymain.tsx2 matches

@pomdtr•Updated 12 months ago
29 app.all("*", async (c) => {
30 const { path } = c.req;
31 return await fetch(`https://api.val.town${path}`, {
32 method: c.req.method,
33 headers: c.req.raw.headers,
36 });
37
38 return app.fetch;
39}

circlesmain.tsx2 matches

@pomdtr•Updated 12 months ago
86 const y = d3.select(this).attr("cy");
87
88 fetch(`/update?x=${x}&y=${y}&i=${d3.select(this).attr("idx")}`, { method: "post" });
89 d3.select(this).attr("stroke", null);
90 }
190 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
191});
192export default app.fetch;

MADBOTSmain.tsx1 match

@jonbo•Updated 12 months ago
17 console.log("🚨");
18
19 await fetch(DISCORD_WEBHOOK, {
20 method: "POST",
21 headers: {

searchmessagesmain.tsx1 match

@tfayyaz•Updated 12 months ago
108});
109
110export default app.fetch;

honoHtmxJsTemplatemain.tsx1 match

@tfayyaz•Updated 12 months ago
38});
39
40export default app.fetch;

honoTanaEndpointmain.tsx1 match

@impedivity•Updated 12 months ago
33 });
34
35 return app.fetch(req);
36};

tanaSavemain.tsx1 match

@impedivity•Updated 12 months ago
29 });
30
31 return app.fetch(req);
32};

hitCounterREADME.md5 matches

@triptych•Updated 12 months ago
1Create a simple hit counter that you can attach to any website via fetch .
2
3I created a web component to use this :
9 this.attachShadow({ mode: 'open' });
10 this.count = 0;
11 this.fetchCount();
12 }
13
14 fetchCount() {
15 fetch('https://triptych-hitcounter.web.val.run/')
16 .then(response => response.json())
17 .then(data => {
19 this.render();
20 })
21 .catch(error => console.error('Error fetching count:', error));
22 }
23

orangeVolemain.tsx4 matches

@yawnxyz•Updated 1 year ago
79const getContent = async (url: string) => {
80 try {
81 const response = await fetch(`https://r.jina.ai/${url}`);
82 if (!response.ok) {
83 throw new Error(`HTTP error! Status: ${response.status}`);
86 return data;
87 } catch (error) {
88 console.error('Error fetching the URL:', error);
89 return 'Error fetching the content.';
90 }
91};
129});
130
131export default app.fetch;
132

GithubPRFetcher

@andybak•Updated 1 day ago

proxiedfetch1 file match

@jayden•Updated 2 days ago