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=515&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 8476 results for "fetch"(1798ms)

marvelousIvorySeahorsemain.tsx4 matches

@noah51022•Updated 5 months ago
6};
7
8// Fetches a random joke.
9async function fetchRandomJoke() {
10 const response = await fetch(
11 "https://official-joke-api.appspot.com/random_joke",
12 );
16export default async function(interval: Interval) {
17 try {
18 const randomJoke = await fetchRandomJoke();
19 console.log(randomJoke);
20 const setup = randomJoke.setup;

enchantingOliveCatfishmain.tsx4 matches

@ga8ilan•Updated 5 months 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;

Jokesmain.tsx4 matches

@VenusFlyTrap•Updated 5 months 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;

cors_proxymain.tsx2 matches

@mxis•Updated 5 months ago
52 };
53
54 // Perform the fetch request to the destination URL
55 const response = await fetch(destUrlString, init);
56
57 // Return the response from the destination URL, including CORS headers

CS1200_systemsDev_modulemain.tsx4 matches

@naman0r•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4
5async function fetchRandomJoke() {
6 const response = await fetch(
7 "https://official-joke-api.appspot.com/random_joke",
8 );
10}
11
12const randomJoke = await fetchRandomJoke();
13const setup = randomJoke.setup;
14const punchline = randomJoke.punchline;

MicroSaasIdeaRoulettemain.tsx1 match

@heltonteixeira•Updated 5 months ago
10 setIsSpinning(true);
11 try {
12 const response = await fetch('/generate-idea');
13 const data = await response.json();
14

agileJadeStarfishmain.tsx1 match

@karimcamara•Updated 5 months ago
2
3async function getRandomJoke() {
4 const response = await fetch(
5 "https://official-joke-api.appspot.com/random_joke",
6 );

magnificentHarlequinWhitefishmain.tsx3 matches

@joshuachann•Updated 5 months 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;

farcasterKeyHookmain.tsx1 match

@artivilla•Updated 5 months ago
59
60 // Forward the payload to Slack
61 const slackResponse = await fetch(SLACK_WEBHOOK_URL, {
62 method: "POST",
63 headers: {

get_clip_iframemain.tsx1 match

@sijames•Updated 5 months ago
25 // the weakest possible implementation so it seems like no one really
26 // cares about it.
27 const response = await fetch(`https://gql.twitch.tv/gql`, {
28 method: "POST",
29 headers: {

fetchPaginatedData2 file matches

@nbbaier•Updated 2 weeks ago

FetchBasic1 file match

@fredmoon•Updated 2 weeks ago