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=931&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 12754 results for "fetch"(3782ms)

getSiteMetadatamain.tsx2 matches

@nbbaier•Updated 5 months ago
9 return metadata;
10 } catch (err) {
11 console.error("Error fetching metadata:", err);
12 return null;
13 }
75);
76
77export default app.fetch;

versatileBrownClownfishmain.tsx5 matches

@riagersappe•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3// Fetches a random joke.
4// Fetches a random joke.
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;

tiny_jest_examplemain.tsx1 match

@willthereader•Updated 5 months ago
11 const runTests = async () => {
12 try {
13 const response = await fetch("/run-tests", {
14 method: "POST",
15 headers: { "Content-Type": "application/json" },

fizzBuzzTestmain.tsx2 matches

@willthereader•Updated 5 months ago
113 const runTests = async () => {
114 try {
115 const response = await fetch("/run-tests", {
116 method: "POST",
117 headers: { "Content-Type": "application/json" },
234 } catch (error) {
235 console.error("Error in runTests:", error);
236 if (error instanceof TypeError && error.message.includes("Failed to fetch dynamically imported module")) {
237 return {
238 success: false,

cors_examplemain.tsx1 match

@stevekrouse•Updated 5 months ago
9 async function request(url, options) {
10 try {
11 const response = await fetch(url, options);
12 const status = response.status;
13 const data = await response.text();

blueskyPostButtonmain.tsx1 match

@lukedenton•Updated 5 months ago
10 const postToBluesky = async () => {
11 try {
12 const response = await fetch("/post-bluesky", {
13 method: "POST",
14 headers: {

curiousCyanWalrusmain.tsx4 matches

@nicosonic•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 response = fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
10}
11
12const randomJoke = fetchRandomJoke();
13const setup = randomJoke.setup;
14const punchline = randomJoke.punchline;

ThankYouNoteGeneratormain.tsx2 matches

@prashamtrivedi•Updated 5 months ago
70 setError("");
71 try {
72 const response = await fetch("/generate", {
73 method: "POST",
74 headers: { "Content-Type": "application/json" },
197 onClick={async () => {
198 try {
199 const response = await fetch(`/update/${noteId}`, {
200 method: "POST",
201 headers: { "Content-Type": "application/json" },

rssSummarizermain.tsx3 matches

@jamiedubs•Updated 5 months ago
20 setError(null);
21 try {
22 const response = await fetch("/run-glif", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },
32 }
33 } catch (error) {
34 console.error("Error fetching results:", error);
35 setError("Failed to fetch results. Please try again.");
36 }
37 setLoading(false);

runGlifmain.tsx1 match

@jamiedubs•Updated 5 months ago
25 };
26
27 const res = await fetch(`https://simple-api.glif.app`, {
28 method: "POST",
29 body: JSON.stringify(body),

fetch-socials4 file matches

@welson•Updated 1 day ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 2 days ago