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/image-url.jpg%20%22Optional%20title%22?q=fetch&page=1114&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 13193 results for "fetch"(3871ms)

isMyWebsiteDownmain.tsx2 matches

@vyatka•Updated 11 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 }

tanBoamain.tsx8 matches

@cool•Updated 11 months ago
1import { fetch as fetch_ } from "https://esm.town/v/std/fetch?v=4";
2import { fetch } from "https://esm.town/v/vladimyr/fetch";
3import { createFetch } from "npm:ofetch";
4
5const ofetch = createFetch({ fetch });
6const ip = await ofetch("https://httpbun.com/ip.json");
7console.log(ip);
8
9{
10 console.log();
11 const ofetch = createFetch({ fetch: fetch_ });
12 const ip = await ofetch("https://httpbun.com/ip.json");
13 console.log(ip);
14 const wip = await ofetch("https://httpbun.com/ip.json");
15 console.log(wip);
16}

sqliteExplorerAppmain.tsx4 matches

@iamseeley•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/iamseeley/resetStyle";
15import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=70";
16import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
17import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
18import { Hono } from "npm:hono";
19import type { FC } from "npm:hono/jsx";
174});
175
176export const handler = app.fetch;
177export default iframeHandler(modifyFetchHandler(passwordAuth(handler)));

emojiDatamain.tsx1 match

@jdan•Updated 11 months ago
9
10export async function emojiData(): Promise<Emoji[]> {
11 const res = await fetch("https://www.unicode.org/Public/draft/emoji/emoji-test.txt");
12 const text = await res.text();
13 const lines = text.split("\n");

codePointNamesmain.tsx1 match

@jdan•Updated 11 months ago
1export async function codePointNames(): Promise<Record<string, string>> {
2 const res = await fetch("https://unicode.org/Public/UNIDATA/UnicodeData.txt");
3 const text = await res.text();
4

uploadThruFileIomain.tsx1 match

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

wiitdb_jsonlmain.tsx1 match

@fossforlife•Updated 11 months ago
4export default async function(req: Request): Promise<Response> {
5 try {
6 const xml = await fetch("https://ej-public-files.sfo3.cdn.digitaloceanspaces.com/wiitdb.xml");
7 const xmlInput = await xml.text();
8 const jsonOutput = await parseXML(xmlInput);

emojiExplodermain.tsx1 match

@jdan•Updated 11 months ago
100 );
101});
102export default app.fetch;

weatherGPTmain.tsx1 match

@mebmeb•Updated 11 months ago
4let location = "brooklyn ny";
5let lang = "en";
6const weather = await fetch(
7 `https://wttr.in/${location}?lang=${lang}&format=j1`,
8).then(r => r.json());

blobAdminmain.tsx2 matches

@yawnxyz•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
135});
136
137export default modifyFetchHandler(passwordAuth(app.fetch, {
138 // password: "123", // Deno.env.get("AUTH_TEST"),
139}));

proxiedfetch1 file match

@jayden•Updated 20 hours ago

fetch-socials4 file matches

@welson•Updated 4 days ago
fetch and archive my social posts