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/$%7Burl%7D?q=fetch&page=56&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 9824 results for "fetch"(646ms)

bluesky-thinkup-tributewatcher.tsx5 matches

@sechilds•Updated 2 days ago
21 let follows: any[] = [];
22 let cursor: string | undefined = undefined;
23 let pagesFetched = 0;
24
25 let seenDids = new Set();
54 // Take time between each page to avoid hammering bluesky too much
55 await new Promise(resolve => setTimeout(resolve, 100));
56 pagesFetched++;
57 console.log(`${pagesFetched} PAGES FETCHED`);
58 }
59
60 console.log(`${pagesFetched} PAGES FETCHED`);
61 console.log(`${follows.length} PROFILES FETCHED`);
62
63 type R = {

doormain.tsx1 match

@juecd•Updated 2 days ago
101});
102
103export default lastlogin(app.fetch);

doorutils.tsx1 match

@juecd•Updated 2 days ago
31 .toString("base64");
32
33 const response = await fetch(`https://api.switch-bot.com/${path}`, {
34 headers: buildSwitchBotHeaders(),
35 ...args,

Zapindex.ts1 match

@Winner_create•Updated 2 days ago
28
29// This is the entry point for HTTP vals
30export default app.fetch;

tinyfeedhttp.ts1 match

@arfan•Updated 2 days ago
2
3export default function (req: Request) {
4 return tinyfeed.fetch(req);
5}
6

FOchiengindex.ts1 match

@FOchieng•Updated 2 days ago
232
233// This is the entry point for HTTP vals
234export default app.fetch;

FOchiengApp.tsx7 matches

@FOchieng•Updated 2 days ago
20 const [isEditing, setIsEditing] = useState(false);
21
22 // Fetch tests from the API
23 const fetchTests = async () => {
24 setLoading(true);
25 setError(null);
26
27 try {
28 const response = await fetch("/api/tests", {
29 headers: {
30 "X-User-ID": userId
37 setTests(data.data);
38 } else {
39 setError(data.error || "Failed to fetch tests");
40 }
41 } catch (err) {
52
53 try {
54 const response = await fetch("/api/tests", {
55 method: "POST",
56 headers: {
82
83 try {
84 const response = await fetch(`/api/tests/${id}`, {
85 method: "PUT",
86 headers: {
117
118 try {
119 const response = await fetch(`/api/tests/${id}`, {
120 method: "DELETE",
121 headers: {

Job-postingjobs.ts2 matches

@Oluremite•Updated 2 days ago
11 return c.json(jobPostings);
12 } catch (error) {
13 console.error("Error fetching jobs:", error);
14 return c.json({ error: "Failed to fetch job postings" }, 500);
15 }
16});

Job-postingindex.tsx17 matches

@Oluremite•Updated 2 days ago
87};
88
89const fetchJobs = async () => {
90 try {
91 const response = await fetch('/api/jobs');
92 if (!response.ok) throw new Error('Failed to fetch jobs');
93 jobs = await response.json();
94 renderJobs();
95 } catch (error) {
96 console.error('Error fetching jobs:', error);
97 }
98};
126
127 try {
128 const response = await fetch('/api/jobs', {
129 method: 'POST',
130 headers: { 'Content-Type': 'application/json' },
138
139 // Refresh job listings
140 await fetchJobs();
141
142 // Add a chat message about the new job
170};
171
172const fetchChatMessages = async () => {
173 try {
174 const response = await fetch('/api/chat');
175 if (!response.ok) throw new Error('Failed to fetch chat messages');
176 const newMessages = await response.json();
177
184 }
185 } catch (error) {
186 console.error('Error fetching chat messages:', error);
187 }
188};
201
202 try {
203 const response = await fetch('/api/chat', {
204 method: 'POST',
205 headers: { 'Content-Type': 'application/json' },
226
227 // Refresh chat messages
228 await fetchChatMessages();
229
230 } catch (error) {
244
245const startChatPolling = () => {
246 // Fetch immediately
247 fetchChatMessages();
248
249 // Then poll every 3 seconds
250 if (chatPollingInterval === null) {
251 chatPollingInterval = setInterval(fetchChatMessages, 3000) as unknown as number;
252 }
253};
307 chatForm.addEventListener("submit", handleChatSubmit);
308
309 // Fetch fresh data
310 fetchJobs();
311};
312

Job-postingchat.ts2 matches

@Oluremite•Updated 2 days ago
12 return c.json(messages);
13 } catch (error) {
14 console.error("Error fetching chat messages:", error);
15 return c.json({ error: "Failed to fetch chat messages" }, 500);
16 }
17});

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 1 day ago

proxyFetch2 file matches

@vidar•Updated 4 days ago