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/?q=fetch&page=1222&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 13277 results for "fetch"(4478ms)

glifsmain.tsx2 matches

@jamiedubs•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const glifs = async (id: string) => {
4 const url = `https://glif.app/api/glifs?featured=1`;
5 try {
6 const response = await fetch(url);
7 if (!response.ok) {
8 throw new Error(`HTTP error! status: ${response.status}`);

refreshTwitterTokenmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function refreshTwitterToken(
15 client_id,
16 });
17 return fetchJSON(url, {
18 method: "POST",
19 headers: {

shitIsMySiteDownmain.tsx2 matches

@dougwithseismic•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export const shitIsMySiteDown = async () => {
12 let status = "up";
13 try {
14 const response = await fetch(URL);
15 if (response.status !== 200) {
16 throw new Error(`status code: ${response.status}`);

twitterRequestAccessTokenmain.tsx2 matches

@andreterron•Updated 1 year ago
1import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function twitterRequestAccessToken(
18 redirect_uri,
19 });
20 return fetchJSON(url, {
21 method: "POST",
22 headers: {

searchArXiVmain.tsx2 matches

@mcgrady20150318•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const searchArXiV = async ({ query = "", start = 0, max_results = 10 }) => {
7 url.searchParams.set("start", start);
8 url.searchParams.set("max_results", max_results);
9 const response = await fetch(url.toString());
10 const text = await response.text();
11 if (!response.ok) {

simpleClimbingmain.tsx3 matches

@cjpais•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const simpleClimbing = (async () => {
59 },
60 ];
61 // const rawWeatherData = await fetch(
62 // `https://api.climbingweather.com/area/detail/738?days=1`,
63 // ).then((r) => r.json());
65 areas.map(async (
66 a,
67 ) => (await fetch(
68 `https://api.climbingweather.com/area/detail/${a.id}?days=1`,
69 ).then((r) => r.json()).then((d) => ({

amain.tsx2 matches

@hoa•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3let getEpicTvProduct = async (url) => {
4 const cheerio = await import("npm:cheerio@1.0.0-rc.12");
5 const html = await (await fetch(url)).text();
6 const $ = cheerio.load(html);
7 console.log("how it run?");

honoTanaEndpointmain.tsx1 match

@lavacxx•Updated 1 year ago
21 return c.json({ newNode });
22 });
23 return app.fetch(req);
24};

runValAPImain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function runValAPI(name, ...args) {
2 return fetch(`https://api.val.town/v1/run/${name.replace("@", "")}`, {
3 method: "POST",
4 body: JSON.stringify({

tanaSavemain.tsx1 match

@nbbaier•Updated 1 year ago
23 });
24
25 return app.fetch(req);
26};

GithubPRFetcher

@andybak•Updated 13 hours ago

proxiedfetch1 file match

@jayden•Updated 1 day ago