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=1190&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 13471 results for "fetch"(7082ms)

serveReadmemain.tsx2 matches

@vladimyr•Updated 1 year ago
3import { gfm } from "https://esm.town/v/pomdtr/gfm?v=24";
4import { appendFragment } from "https://esm.town/v/vladimyr/appendFragment";
5import { fetchVal } from "https://esm.town/v/vladimyr/fetchVal";
6import { linkifyReadme } from "https://esm.town/v/vladimyr/linkifyReadme";
7
14 return async (): Promise<Response> => {
15 const { author, name } = extractValInfo(valUrl);
16 const { readme } = await fetchVal(author, name);
17 if (!readme) {
18 return new Response(null, { status: 404 });

kyselyVtTypesmain.tsx1 match

@easrng•Updated 1 year ago
66 "embed",
67 "document",
68 ].includes(req.headers.get("sec-fetch-dest"))
69 )
70 return new Response(

dumbingOfAgeServerTimemain.tsx1 match

@easrng•Updated 1 year ago
2 const before = Date.now();
3 const serverTs = new Date(
4 (await fetch(
5 "https://www.dumbingofage.com/wp-content/uploads/css/custom_style.css?v=" +
6 Date.now()

fetch_example2README.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: a2_shared/fetch_example2

CS1200main.tsx4 matches

@parkddongddoong•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9}
10
11const randomJoke = await fetchRandomJoke();
12const setup = randomJoke.setup;
13const punchline = randomJoke.punchline;

activityPubAgentmain.tsx3 matches

@vladimyr•Updated 1 year ago
2import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
3import { createInstanceActor } from "https://esm.town/v/vladimyr/activityPubInstanceActor";
4import { createSignedFetch } from "https://esm.town/v/vladimyr/signedFetch";
5import { privateKeyPem, publicKeyPem } from "https://esm.town/v/vladimyr/signRequest_testdata";
6
12export { id, publicKeyId };
13
14const signedFetch = createSignedFetch({
15 pkcs8: privateKeyPem,
16 publicKeyId,
21 const query = Object.fromEntries(searchParams.entries());
22 if (pathname === "/" && query.url) {
23 const resp = await signedFetch(query.url, {
24 headers: { accept: "application/activity+json" },
25 });

gsheet_callmain.tsx2 matches

@hiteshjoshi•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 {

fetchNewestValsmain.tsx1 match

@vladimyr•Updated 1 year ago
36});
37
38export async function fetchNewestVals({ page = 0 } = {}) {
39 const url = new URL("https://www.val.town/newest");
40 url.searchParams.set("_data", "routes/_app.newest");

fetchValmain.tsx1 match

@vladimyr•Updated 1 year ago
24});
25
26export async function fetchVal(author: string, name: string) {
27 const prefixUrl = new URL("/v1/alias", API_URL);
28 const resp = await ky.get(`${author}/${name}`, { prefixUrl }).json();

fetchTextmain.tsx4 matches

@vladimyr•Updated 1 year ago
1import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";
2
3export const fetchText = async (
4 url: string | URL,
5 options?: RequestInit & {
6 bearer?: string;
7 fetch?: typeof fetch;
8 },
9) => {
13 headers.set("authorization", `Bearer ${options.bearer}`);
14 }
15 let fetch = options?.fetch ?? globalThis.fetch;
16 let resp = await fetch(url, {
17 redirect: "follow",
18 ...options,

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago