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/$%7Bsuccess?q=fetch&page=937&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 11073 results for "fetch"(973ms)

telemetryREADME.md1 match

@saolsen•Updated 1 year ago
77```
78
79* `fetch` is a traced version of the builtin `fetch` function that traces the request. Just import it and use it like you would use `fetch`.
80
81* `sqlite` is a traced version of the val town sqlite client. Just import it and use it like you would use [https://www.val.town/v/std/sqlite](https://www.val.town/v/std/sqlite)

valwritermain.tsx6 matches

@yawnxyz•Updated 1 year ago
1/** @jsxImportSource npm:hono@3/jsx */
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
3import { chat } from "https://esm.town/v/stevekrouse/openai";
4import cronstrue from "npm:cronstrue";
17It stores each line of the poem in sqlite.
18It has a textbox that lets anyone input a new line to the poem.`,
19 content: await fetchText("https://esm.town/v/stevekrouse/poembuilder3?v=4"),
20 },
21 {
22 user: "an app that uses chatgpt to convert natural language to cron syntax",
23 content: await fetchText("https://esm.town/v/stevekrouse/cron2"),
24 },
25];
26
27const app = new Hono();
28export default app.fetch;
29app.get("/", async (c) => {
30 const example = examples[0] // examples[Math.floor(Math.random() * examples.length)];
74 You write Deno TypeScript.
75 Reply ONLY with valid Typescript.
76 Export the fetch function to run the server.
77 Only use web standard fetch. Export the fetch function to start the server.
78 Add extensive comments`,
79 },

PriestGPTmain.tsx1 match

@mjweaver01•Updated 1 year ago
66});
67
68export default app.fetch;

signedFetchREADME.md1 match

@stevekrouse•Updated 1 year ago
1Migrated from folder: Archive/auth/signedFetch

umbrellaRemindermain.tsx2 matches

@tjvantoll•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );

weatherBotmain.tsx5 matches

@jdan•Updated 1 year ago
1import { latLngOfCity } from "https://esm.town/v/jdan/latLngOfCity";
2import { fetchWebpage } from "https://esm.town/v/jdan/fetchWebpage";
3import { weatherOfLatLon } from "https://esm.town/v/jdan/weatherOfLatLon";
4import { OpenAI } from "https://esm.town/v/std/openai?v=4";
59 call: weatherOfLatLon
60 },
61 "fetchWebpage": {
62 openAiTool: {
63 type: "function",
64 function: {
65 name: "fetchWebpage",
66 description: "Fetch the weather forecast from the contents of a forecast URL",
67 parameters: {
68 type: "object",
78 }
79 },
80 call: fetchWebpage
81 }
82};

fetchWebpagemain.tsx3 matches

@jdan•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
2
3export async function fetchWebpage(args: { url: string }) {
4 const { url } = args;
5 const html = await fetchText(args.url);
6 return html;
7}

fetchWebpageREADME.md1 match

@jdan•Updated 1 year ago
1Migrated from folder: openai_function_calling/fetchWebpage

latLngOfCitymain.tsx2 matches

@jdan•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
2import { load } from "npm:cheerio";
3
4export async function latLngOfCity(args: { cityName: string }) {
5 const { cityName } = args;
6 const html = await fetchText(
7 `https://en.wikipedia.org/wiki/${cityName}`,
8 );

isMyWebsiteDownmain.tsx3 matches

@tsevdos•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=11";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export default async () => {
8 let reason: string;
9 try {
10 const res = await fetch(URL);
11 if (res.status !== 200) {
12 reason = `(status code: ${res.status})`;
14 }
15 } catch (e) {
16 reason = `couldn't fetch: ${e}`;
17 ok = false;
18 }

fetch_template2 file matches

@gwoods22•Updated 7 hours ago

HN-fetch-call3 file matches

@ImGqb•Updated 1 day ago
fetch HackerNews by API