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=1040&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 13095 results for "fetch"(1313ms)

blob_adminmain.tsx2 matches

@davisshaver•Updated 8 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";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

finalScrapermain.tsx6 matches

@rochambeau314•Updated 8 months ago
1// This val creates a form to input a Zillow or Craigslist link, determines the link type,
2// calls the appropriate scraping API, and renders the results in a table.
3// It uses React for the UI, fetch for API calls, and basic string manipulation for link validation.
4
5/** @jsxImportSource https://esm.sh/react */
20
21 try {
22 const response = await fetch("/scrape", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },
27
28 if (!response.ok) {
29 throw new Error("Failed to fetch data");
30 }
31
33 setResults(data);
34 } catch (err) {
35 setError("An error occurred while fetching the data.");
36 } finally {
37 setIsLoading(false);
106
107 try {
108 const scrapeResponse = await fetch(`${scrapingEndpoint}${encodeURIComponent(link)}`);
109 if (!scrapeResponse.ok) {
110 throw new Error("Failed to scrape data");
113
114 // Calculate transit time
115 const transitResponse = await fetch(`https://rochambeau314-calculatetransitapi.web.val.run?address=${encodeURIComponent(scrapeResult.address)}`);
116 if (!transitResponse.ok) {
117 throw new Error("Failed to calculate transit time");

resyBookSlotmain.tsx2 matches

@vtdocs•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3import { sleep } from "https://esm.town/v/vtdocs/sleep";
18 while (true) {
19 try {
20 const bookRes = await fetch(`https://api.resy.com/3/book`, {
21 method: "POST",
22 headers: {

resyGetSlotBookingTokenmain.tsx2 matches

@vtdocs•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
15 party_size: partySize.toString(),
16 };
17 const detailsRes = await fetch(
18 `https://api.resy.com/3/details?${new URLSearchParams(detailsParams)}`,
19 {

resyGetMatchingSlotmain.tsx2 matches

@vtdocs•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
22 const startTime = new Date(`${day} ${start}`);
23 const endTime = new Date(`${day} ${end}`);
24 const slotsRes = await fetch(
25 `https://api.resy.com/4/find?lat=0&long=0&day=${day}&party_size=${partySize}&venue_id=${venueId}`,
26 {

sqliteExplorerAppmain.tsx4 matches

@peterhartree•Updated 9 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/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

resyGetMatchingSlotmain.tsx2 matches

@maxm•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
22 const startTime = new Date(`${day} ${start}`);
23 const endTime = new Date(`${day} ${end}`);
24 const slotsRes = await fetch(
25 `https://api.resy.com/4/find?lat=0&long=0&day=${day}&party_size=${partySize}&venue_id=${venueId}`,
26 {

resyAuthmain.tsx2 matches

@vtdocs•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
9 }[];
10}> => {
11 const authRes = await fetch("https://api.resy.com/3/auth/password", {
12 "headers": {
13 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,

resyAuthmain.tsx2 matches

@maxm•Updated 9 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { resyPublicAPIKey } from "https://esm.town/v/vtdocs/resyPublicAPIKey";
3
9 }[];
10}> => {
11 const authRes = await fetch("https://api.resy.com/3/auth/password", {
12 "headers": {
13 "authorization": `ResyAPI api_key="${resyPublicAPIKey}"`,

oldHomepagemain.tsx1 match

@willthereader•Updated 9 months ago
67const app = new Hono();
68app.get("/", homepage);
69export default app.fetch;

fetch-socials4 file matches

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

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 3 days ago