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=1057&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 11139 results for "fetch"(1366ms)

badWordsWith5LettersOrLessmain.tsx2 matches

@joemaffei•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let badWordsWith5LettersOrLess = (async () => {
4 const res = await fetch(
5 "https://raw.githubusercontent.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words/master/en",
6 );

githubmain.tsx2 matches

@markthree•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let github = fetchJSON(
4 "https://api.github.com/users/markthree"
5);

boredActivitiesmain.tsx2 matches

@bobbydigital•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity"
6);

test_concurrencyDoesntWorkmain.tsx17 matches

@alp•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const test_concurrencyDoesntWork = (async () => {
4 const fetchDelayedResponse = async (index: number) => {
5 const start = Date.now();
6 const response = await fetch(
7 "https://api.val.town/v1/express/alp.proxyFetch1",
8 {
9 method: "POST",
19 );
20 };
21 const fetchDelayedResponseWithLoadBalancer = async (index: number) => {
22 const start = Date.now();
23 const response = await fetch(
24 `https://api.val.town/v1/express/alp.proxyFetch${index}`,
25 {
26 method: "POST",
38 console.log("w/o load balancer");
39 await Promise.all([
40 fetchDelayedResponse(1),
41 fetchDelayedResponse(2),
42 fetchDelayedResponse(3),
43 fetchDelayedResponse(4),
44 fetchDelayedResponse(5),
45 ]);
46 console.log("w/ load balancer");
47 await Promise.all([
48 fetchDelayedResponseWithLoadBalancer(1),
49 fetchDelayedResponseWithLoadBalancer(2),
50 fetchDelayedResponseWithLoadBalancer(3),
51 fetchDelayedResponseWithLoadBalancer(4),
52 fetchDelayedResponseWithLoadBalancer(5),
53 ]);
54})();

peelSessionArtistmain.tsx2 matches

@aeaton•Updated 1 year ago
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtist(url) {
4 const dom = await fetchHtmlDom(url);
5 const title = dom.querySelector("h3")?.textContent.trim();
6 const bio = dom.querySelector("#bio1")?.textContent.trim();

githubEventsmain.tsx2 matches

@larsr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/stevekrouse/events"
6);

mathFactmain.tsx2 matches

@potherca•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);

fetchValTownAPImain.tsx3 matches

@pomdtr•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function fetchValTownAPI(
4 apiToken: string,
5 path: string,
12 path = "/v1" + path;
13 }
14 return fetchJSON(`https://api.val.town${path}`, {
15 ...options,
16 headers: {

elevenlabsTTSmain.tsx2 matches

@ale_annini•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
14 };
15 const voiceId = "21m00Tcm4TlvDq8ikWAM"; // https://api.elevenlabs.io/v1/voices
16 const audio = await fetch(
17 `https://api.elevenlabs.io/v1/text-to-speech/${voiceId}`,
18 {

dighimapperMultipleMapsmain.tsx2 matches

@bert•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const dighimapperMultipleMaps = (async () => {
4 const url =
5 "https://annotations.allmaps.org/maps?imageservicedomain=images.dighimapper.eu";
6 const reponse = await fetch(url);
7 const annotations = await reponse.json();
8 let imageIds = new Set();

fetch_template2 file matches

@gwoods22•Updated 1 day ago

HN-fetch-call3 file matches

@ImGqb•Updated 2 days ago
fetch HackerNews by API