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/image-url.jpg%20%22Image%20title%22?q=fetch&page=740&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 8630 results for "fetch"(1506ms)

untitled_amethystShrewmain.tsx4 matches

@adheep04•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;

untitled_coralGerbilmain.tsx3 matches

@lokyeyoung_create•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4function fetchRandomJoke() {
5 const SAMPLE_JOKE = {
6 "setup": "What do you call a group of disorganized cats?",
10}
11
12const randomJoke = fetchRandomJoke();
13const setup = randomJoke.setup;
14const punchline = randomJoke.punchline;

untitled_sapphireEchidnamain.tsx4 matches

@seamusmuf123•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;

unpkgmain.tsx1 match

@vladimyr•Updated 1 year ago
86});
87
88export default app.fetch;

systemsDevModulemain.tsx4 matches

@ethtang•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;

honoZodSwaggerUimain.tsx1 match

@stevekrouse•Updated 1 year ago
91app.get("/swagger", swaggerUI({ url: "/openapi.json" }));
92
93export default app.fetch;

podcastBadgemain.tsx1 match

@vladimyr•Updated 1 year ago
56});
57
58export default app.fetch;
59
60async function getBadgeOptions(rssUrl: string | URL): Promise<BadgenOptions> {

podnewsmain.tsx1 match

@vladimyr•Updated 1 year ago
1// import { fetch } from "https://esm.town/v/std/fetch?v=4";
2import ky, { HTTPError } from "npm:ky@1.1.3";
3

handleGroupmeMessagemain.tsx3 matches

@tjnoe•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
7) {
8 const getRandomRhyme = async (word: string) => {
9 const rhymeRes = await fetch(
10 `https://api.datamuse.com/words?rel_rhy=${word}`,
11 );
20 };
21 const sendGroupmeMessage = async (bot_id: string, text: string) => {
22 const response = await fetch("https://api.groupme.com/v3/bots/post", {
23 method: "POST",
24 headers: {

testFilteringCommentsValmain.tsx5 matches

@willthereader•Updated 1 year ago
1import { ConstructReadTangleUrl } from "https://esm.town/v/willthereader/ConstructReadTangleUrl";
2import { fetchComments } from "https://esm.town/v/willthereader/fetchComments";
3import { FilterCommentsVal } from "https://esm.town/v/willthereader/FilterCommentsVal";
4import { logMessage } from "https://esm.town/v/willthereader/logMessage";
11 // Construct the URL with the desired parameters
12 const url = ConstructReadTangleUrl({ post_id: "6525827c68f969000134e052" });
13 // Fetch the comments using the constructed URL
14 logMessage("info", "Fetching comments from the server");
15 const comments = await fetchComments(url);
16 // Now filter the fetched comments
17 const filteredComments = await FilterCommentsVal.filterComments(
18 comments,

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago