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=1184&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 13558 results for "fetch"(2949ms)

extract_contentmain.tsx3 matches

@cotr•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import * as cheerio from "npm:cheerio";
3
7 const url = body.url;
8 if (url) {
9 // Use std/fetch for proxied request
10 const response = await fetch(url);
11 const html = await response.text();
12 const $ = cheerio.load(html);

DownTimemain.tsx2 matches

@sirdrope•Updated 1 year 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 }

dailyDadJokemain.tsx2 matches

@tomasholub•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
7 text: punchline,

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(

counterscaleWeeklyReportmain.tsx2 matches

@benvinegar•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4import process from "node:process";
43 ORDER BY isVisitor, isVisit ASC
44 `;
45 let result = await fetch(url, {
46 headers: {
47 "Authorization": `Bearer ${apiKey}`,

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

indielogin_examplemain.tsx2 matches

@pomdtr•Updated 1 year ago
45 });
46 }
47 const user = fetch("https://pomdtr-indielogin.web.val.run", {
48 method: "POST",
49 headers: {
61});
62
63export default app.fetch;

github_oauth_proxymain.tsx1 match

@pomdtr•Updated 1 year ago
7const app = new Hono();
8
9export default app.fetch;

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago