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%22Optional%20title%22?q=fetch&page=1217&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 16326 results for "fetch"(4024ms)

cerebras_codermain.tsx1 match

@harrythedevopsguy•Updated 6 months ago
187
188 try {
189 const response = await fetch("/", {
190 method: "POST",
191 body: JSON.stringify({

quoteExtractormain.tsx1 match

@dh1011•Updated 6 months ago
17 setIsLoading(true);
18 try {
19 const response = await fetch('/extract', {
20 method: 'POST',
21 body: JSON.stringify({ text })

blobCommentDemomain.tsx1 match

@airandopal•Updated 6 months ago
133})
134
135export default app.fetch;

newFavoriteSongBotmain.tsx3 matches

@alexwein•Updated 6 months ago
48async function uploadImage(agent: AtpAgent, imageUrl: string) {
49 try {
50 // Fetch the image
51 const response = await fetch(imageUrl);
52 if (!response.ok) {
53 console.error(`Failed to fetch image: ${imageUrl}`);
54 return null;
55 }

cerebras_codermain.tsx1 match

@ninadxc•Updated 6 months ago
187
188 try {
189 const response = await fetch("/", {
190 method: "POST",
191 body: JSON.stringify({

geminichatmain.tsx6 matches

@arfan•Updated 6 months ago
218 });
219 } catch (error) {
220 console.error("Error fetching messages:", error);
221 return new Response(
222 JSON.stringify({ error: "Failed to fetch messages" }),
223 { status: 500 },
224 );
379 const loadMessages = async () => {
380 try {
381 const response = await fetch("/messages");
382 if (!response.ok) {
383 throw new Error("Failed to fetch messages");
384 }
385 const data = await response.json();
386 setMessages(data);
387 } catch (error) {
388 console.error("Error fetching messages:", error);
389 setMessages([
390 {
406
407 try {
408 const response = await fetch("/chat", {
409 method: "POST",
410 headers: { "Content-Type": "application/json" },

p5main.tsx1 match

@moe•Updated 6 months ago
14 // const imageUrl = "https://charlypoly-httpapiscreenshotpageexample.web.val.run/?url=" + url.origin;
15 // return Response.redirect(imageUrl, 302)
16 const res = await fetch(imageUrl);
17 const blob = await res.blob();
18 return new Response(blob, { headers: { "Content-Type": "image/png" } });

countryOutlineSVGmain.tsx1 match

@andybak•Updated 6 months ago
20 try {
21 // Use a more reliable GeoJSON source
22 const response = await fetch(
23 `https://raw.githubusercontent.com/datasets/geo-countries/master/data/countries.geojson`,
24 );

unicodeToSVGmain.tsx2 matches

@andybak•Updated 6 months ago
24 const fontUrl = "https://github.com/googlefonts/roboto/raw/main/src/hinted/Roboto-Regular.ttf";
25
26 // Fetch and parse the font
27 const fontResponse = await fetch(fontUrl);
28 const fontArrayBuffer = await fontResponse.arrayBuffer();
29

nearsparkmain.tsx4 matches

@andybak•Updated 6 months ago
96
97 try {
98 console.log('Fetching image from:', imageUrl);
99 const response = await fetch(imageUrl);
100 if (!response.ok) {
101 throw new Error(`HTTP error! status: ${response.status}`);
144 let errorMessage = `Error processing image: ${error.message}. `;
145 if (error.message.includes('HTTP error')) {
146 errorMessage += 'The image could not be fetched from the provided URL. Please check if the URL is correct and accessible.';
147 } else if (error.message.includes('decode')) {
148 errorMessage += 'The image could not be decoded. Please ensure the URL points to a valid image file.';
149 } else if (error.message.includes('client error (Connect)')) {
150 errorMessage += 'There was a network error while trying to fetch the image. This might be due to network restrictions or the image server being unreachable.';
151 } else {
152 errorMessage += 'An unexpected error occurred while processing the image. Please try again or contact support if the issue persists.';

readwise-instapaper1 file match

@welson•Updated 3 days ago
Fetches my articles from Readwise. Syncs with/ Neon + Instapaper

manual-fetcher

@miz•Updated 2 weeks ago