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=286&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 3120 results for "fetch"(405ms)

insecureFetchmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1export function insecureFetch(input: string | URL | Request, init?: RequestInit) {
2 const origReq = new Request(input, init);
3 const proxyURL = new URL("https://unsecure-fetch.val-town.workers.dev");
4 proxyURL.searchParams.set("url", origReq.url);
5 const req = new Request(proxyURL, origReq);
6 return globalThis.fetch(req);
7}

prism_feature_notificationsmain.tsx1 match

@stevekrouse•Updated 1 year ago
15
16export default async function(interval: Interval) {
17 const response = await fetch(dictionaryUrl);
18 const { features } = await response.json();
19 const featuresAboveConfidenceThreshold = features.filter(

roseDragonmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function uploadTo0x0(data, name) {
6 formData.append("file", blob, name);
7 formData.append("expires", "1");
8 const response = await fetch("https://0x0.st", {
9 method: "POST",
10 body: formData,

fileInputUploadExamplemain.tsx1 match

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

fileInputUploadExampleREADME.md1 match

@stevekrouse•Updated 1 year ago
7Currently (as of 4/14/24) this only works for small files (< 1mb). For larger files you get an error: `{"statusCode":413,"error":"Payload Too Large","message":"request entity too large"}`.
8
9A workaround is to upload to another service client-side, send the URL from that service to your Val Town server, and then fetch the file server-side (helper: @stevekrouse/uploadTo0x0).
10
11Migrated from folder: Archive/fileInputUploadExample

signedFetchREADME.md1 match

@stevekrouse•Updated 1 year ago
1Migrated from folder: Archive/auth/signedFetch

calorieappmain.tsx1 match

@stevekrouse•Updated 1 year ago
83});
84
85export default app.fetch;

cron2main.tsx1 match

@stevekrouse•Updated 1 year ago
5
6const app = new Hono();
7export default app.fetch;
8app.get("/", async (c) => {
9 const description = c.req.query("description") || "On weekdays at noon";

poembuilder3main.tsx1 match

@stevekrouse•Updated 1 year ago
59});
60
61export default app.fetch;

poembuildermain.tsx1 match

@stevekrouse•Updated 1 year ago
60});
61
62export default app.fetch

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago