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=624&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 9282 results for "fetch"(2107ms)

zwiftPortalScheduleREADME.md1 match

@dazzag24•Updated 6 months ago
1Fetch and parse the Zwift Climbing Portal Schedule XML from the Zwift CDN.
2
3Example usage:

newRSSItemsmain.tsx2 matches

@gwoods22•Updated 6 months ago
1import { fetchRSS } from "https://esm.town/v/stevekrouse/fetchRSS";
2
3export let newRSSItems = ({ url, lastRunAt }: { url: string; lastRunAt?: Date }) =>
4 fetchRSS(url)
5 .then(({ channel: { item } }) =>
6 (Array.isArray(item) ? item : [item]).filter(

png64main.tsx1 match

@all•Updated 6 months ago
50 formData.append('image', file);
51
52 const response = await fetch('?process=true', {
53 method: 'POST',
54 body: formData

squishyformmain.tsx5 matches

@yawnxyz•Updated 6 months ago
164 try {
165 const url = 'https://yawnxyz-executeproxy.web.val.run/execute';
166 const response = await fetch(url, {
167 method: 'POST',
168 headers: {
174 if (!response.ok) {
175 let errorJson = await response.json();
176 console.error('Fetch Error:', errorJson)
177 }
178
186 ...JSON.parse(data),
187 };
188 updateStore(newData, "fetch");
189 } catch (e) {
190 console.error('Failed to parse result:', e);
192 ...$parsedResult.get(),
193 ...data?.result?.data,
194 }, "fetch");
195 }
196 console.log('parsed:', data, $parsedResult.get());
634app.get("/", (c) => c.html(html));
635
636export default (typeof Deno !== "undefined" && Deno.env.get("valtown")) ? app.fetch : app;
637
638

webdavServermain.tsx1 match

@pomdtr•Updated 6 months ago
298 });
299
300 return app.fetch(req);
301}
302

uniswapV3Positionmain.tsx7 matches

@midnightlightning•Updated 6 months ago
33/**
34 * This is the main function that looks up information about a Uniswap V3 position.
35 * Given a position ID in the URL, it fetches all the details about that position
36 * including what tokens are involved, their current prices, and whether the position
37 * is currently active.
55 }
56
57 // Fetch info about this liquidity position
58 let positionData;
59 try {
69 return Response.json({
70 ok: false,
71 message: `Failed to fetch position data: ${err.message}`,
72 });
73 }
88 ] = positionData;
89
90 // Fetch info about the two tokens in the position
91 const erc20ABI = parseAbi([
92 "function name() view returns (string)",
135 return Response.json({
136 ok: false,
137 message: `Failed to fetch token data: ${err.message}`,
138 });
139 }
155 return Response.json({
156 ok: false,
157 message: `Failed to fetch pool address: ${err.message}`,
158 });
159 }
171 return Response.json({
172 ok: false,
173 message: `Failed to fetch slot0 data: ${err.message}`,
174 });
175 }

inventiveAmethystSheepmain.tsx2 matches

@temptemp•Updated 6 months ago
10
11 for (const url of urls) {
12 const response = await fetch(url);
13 if (!response.ok) {
14 console.error(`Failed to fetch ${url}: ${response.statusText}`);
15 continue;
16 }

PhoenixProxymain.tsx1 match

@cephalization•Updated 6 months ago
42 const fullUrl = `${HOSTED_PHOENIX_BASE_URL}${Url.pathname}${Url.search}`;
43
44 return fetch(fullUrl, init);
45}

deletebiomain.tsx1 match

@yawnxyz•Updated 6 months ago
276
277
278export default (typeof Deno !== "undefined" && Deno.env.get("valtown")) ? app.fetch : app;

preciseAquamarineReptilemain.tsx1 match

@stevekrouse•Updated 6 months ago
44
45 try {
46 const response = await fetch("/", {
47 method: "POST",
48 body: JSON.stringify({ prompt, currentCode: code }),

proxyFetch2 file matches

@vidar•Updated 1 day ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 2 days ago