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=947&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 13568 results for "fetch"(5565ms)

twitterAlertmain.tsx1 match

@ben5mills5•Updated 4 months ago
20 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
21
22 // Fetch and log tweets
23 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
24 console.log("Response from socialDataSearch:", response);

chatApplicationmain.tsx18 matches

@Shigigami•Updated 4 months ago
30
31 try {
32 const response = await fetch(`/${mode}`, {
33 method: "POST",
34 headers: { "Content-Type": "application/json" },
41 setIsLoggedIn(true);
42 setError("");
43 await fetchContacts();
44 await fetchMessages();
45 await fetchFiles();
46 } else {
47 setError(data.message || "Authentication failed");
53 };
54
55 const fetchContacts = async () => {
56 try {
57 const response = await fetch("/contacts");
58 if (response.ok) {
59 const data = await response.json();
64 }
65 } catch (error) {
66 console.error("Failed to fetch contacts", error);
67 }
68 };
69
70 const fetchMessages = async () => {
71 try {
72 const response = await fetch("/messages");
73 if (response.ok) {
74 const data = await response.json();
76 }
77 } catch (error) {
78 console.error("Failed to fetch messages", error);
79 }
80 };
81
82 const fetchFiles = async () => {
83 try {
84 const response = await fetch("/files");
85 if (response.ok) {
86 const data = await response.json();
88 }
89 } catch (error) {
90 console.error("Failed to fetch files", error);
91 }
92 };
97
98 try {
99 const response = await fetch("/message", {
100 method: "POST",
101 headers: { "Content-Type": "application/json" },
109 if (response.ok) {
110 setNewMessage("");
111 await fetchMessages();
112 }
113 } catch (error) {
141
142 try {
143 const response = await fetch("/upload", {
144 method: "POST",
145 body: formData
147
148 if (response.ok) {
149 await fetchFiles();
150 fileInputRef.current.value = null;
151 }
157 const downloadFile = async (fileId) => {
158 try {
159 const response = await fetch(`/download/${fileId}`);
160 if (response.ok) {
161 const blob = await response.blob();

umbrellaRemindermain.tsx2 matches

@samjb123•Updated 4 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );

cerebras_codermain.tsx1 match

@GoldGuy•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

templateTwitterAlertmain.tsx1 match

@valdottown•Updated 4 months ago
19 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
20
21 // Fetch and log tweets
22 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23 console.log("Response from socialDataSearch:", response);

cerebras_codermain.tsx1 match

@a10minutedraft•Updated 4 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cafetiraCafeAndBilliardTournamentmain.tsx6 matches

@Kpool•Updated 4 months ago
44 useEffect(() => {
45 if (selectedCategory === "tournament") {
46 fetchScoreboard();
47 }
48 }, [selectedCategory]);
55
56 try {
57 const response = await fetch("/register", {
58 method: "POST",
59 headers: { "Content-Type": "application/json" },
65 setRegisteredName(playerName);
66 setRegistrationError("");
67 fetchScoreboard();
68 } else {
69 setRegistrationError(result.message || "Registration failed");
74 };
75
76 const fetchScoreboard = async () => {
77 try {
78 const response = await fetch("/scoreboard");
79 const data = await response.json();
80 setScoreboard(data);
81 } catch (error) {
82 console.error("Failed to fetch scoreboard", error);
83 }
84 };

passkeys_demomain.tsx1 match

@maxm•Updated 4 months ago
298 return c.json("success");
299});
300export default app.fetch;

comfortableOrangeSparrowmain.tsx2 matches

@charmaine•Updated 4 months ago
42
43 try {
44 const response = await fetch(`https://www.shovel.report/api/domains/${domain}`);
45 if (!response.ok) {
46 throw new Error(`HTTP error! status: ${response.status}`);
52 };
53 } catch (error) {
54 console.error("Error fetching technologies:", error);
55 return { services: [], social_media: {} };
56 }

properPurplePorpoisemain.tsx1 match

@charmaine•Updated 4 months ago
16 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
17
18 // Fetch and log tweets
19 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
20 console.log("Response from socialDataSearch:", response);

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago