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?q=fetch&page=1183&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 13572 results for "fetch"(2788ms)

oak_demomain.tsx1 match

@stevekrouse•Updated 1 year ago
7});
8
9export default app.fetch;

GistGPT_Clientmain.tsx3 matches

@weaverwhale•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/hono/jsx */
2import { fetch } from "https://esm.town/v/std/fetch";
3import { Marked } from "npm:@ts-stack/markdown";
4import { Hono } from "npm:hono";
55 const url = c.req.query("url");
56 // https://www.val.town/v/weaverwhale/GistGPT
57 const answer = await fetch(`https://weaverwhale-gistgpt.web.val.run/gist?url=${url}`).then(
58 (res) => res.text(),
59 );
83});
84
85export default app.fetch;

PriestGPTClientmain.tsx3 matches

@mjweaver01•Updated 1 year ago
1/** @jsxImportSource https://esm.sh/hono/jsx */
2import { fetch } from "https://esm.town/v/std/fetch";
3import { Hono } from "npm:hono";
4
41 const verse = c.req.param("verse");
42 // https://www.val.town/v/mjweaver01/PriestGPT
43 const answer = await fetch(`https://mjweaver01-priestgpt.web.val.run/ask/${encodeURI(verse)}`).then(
44 (res) => res.text(),
45 );
64});
65
66export default app.fetch;

blob_adminmain.tsx2 matches

@curtcox•Updated 1 year 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";
88});
89
90export default modifyFetchHandler(passwordAuth(app.fetch));

dailyDadJokemain.tsx2 matches

@bomberstudios•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,

hnResumemain.tsx2 matches

@cocodrilette•Updated 1 year ago
6 const hnStoryURL = "https://hacker-news.firebaseio.com/v0/item/";
7
8 const topStories = await fetch(hnTopStoriesURL).then((res) => res.json());
9 const firstFive = topStories.slice(0, 5);
10 const stories = await Promise.all(
11 firstFive.map((id: number) => fetch(`${hnStoryURL}${id}.json`).then((res) => res.json())),
12 );
13

plantsmain.tsx1 match

@stevekrouse•Updated 1 year ago
78});
79
80export default app.fetch;

blob_editormain.tsx4 matches

@pomdtr•Updated 1 year ago
6 const ref = useRef();
7 const saveBlob = async () => {
8 const resp = await fetch("/edit", {
9 method: "POST",
10 body: JSON.stringify({
158 });
159
160 return router.fetch(req);
161 };
162}
163
164export default async function(req: Request) {
165 const { modifyFetchHandler } = await import("https://esm.town/v/andreterron/codeOnValTown?v=50");
166 return modifyFetchHandler(blobEditor("blob_editor_demo.md"))(req);
167}

dailyDadJokemain.tsx2 matches

@sieteunoseis•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 punchline;
7}

gsheet_callmain.tsx2 matches

@gwelinder•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const gsheet_call = async (service_account, sheet_id, method, action, data) => {
9 };
10 const token = await getToken(service_account, googleAuthOptions);
11 const result = fetchJSON(
12 `https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`,
13 {

FetchBasic2 file matches

@ther•Updated 28 mins ago

GithubPRFetcher

@andybak•Updated 3 days ago