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?q=fetch&page=158&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 10229 results for "fetch"(810ms)

beeGPTfrontend.html2 matches

@armadillomike•Updated 1 week ago
437 try {
438 // Send message to API
439 const response = await fetch('/api/chat', {
440 method: 'POST',
441 headers: {
503 try {
504 // Send request to generate image
505 const response = await fetch('/api/generate-image', {
506 method: 'POST',
507 headers: {

embed-servicestests.tsx1 match

@temptemp•Updated 1 week ago
2 const url = new URL(req.url);
3 url.host = `02c3dc47-4c6a-4818b-84ae-d22210c9d4cb.cloudflarepreviews.com`;
4 const ver = await fetch(
5 url,
6 {

embed-servicesmax-cron.tsx3 matches

@temptemp•Updated 1 week ago
1const script = `
2export default {
3 async fetch(request, env, ctx) {
4 const url = new URL(request.url);
5 url.host = "embed-hono.lime4042.workers.dev";
6 console.log(url)
7 const r = await fetch(url,request);
8 return new Response((r).body,r);
9 },
19 files.append("uuid", uuid);
20 files.append("token", key);
21 const upload = await fetch(
22 `https://temptemp-workers.web.val.run/pushCode?uuid=${uuid}&token=${key}`,
23 {

Bee_AIindex.tsx1 match

@quartex•Updated 1 week ago
42
43 try {
44 const response = await fetch("/ask", {
45 method: "POST",
46 body: JSON.stringify({ question }),

testDaily.tsx11 matches

@xhaka•Updated 1 week ago
23 const [paymentMethodFilter, setPaymentMethodFilter] = useState<PaymentMethodFilter>(null);
24
25 // Fetch sales and payment data
26 const fetchSalesData = async (startDate: Date, endDate: Date) => {
27 setIsLoading(true);
28 setError(null);
32 const dateTo = endDate.toISOString().split('T')[0];
33
34 // Fetch both data sets in parallel
35 const [salesResponse, paymentsResponse] = await Promise.all([
36 getSaleWaiters(dateFrom, dateTo),
39
40 if (salesResponse && paymentsResponse) {
41 console.log('Fetched sales data:', salesResponse.length, 'records');
42 console.log('Fetched payment data:', paymentsResponse.length, 'records');
43
44 setSalesData(salesResponse);
49 }
50 } catch (error) {
51 setError('Failed to fetch sales data. Please try again.');
52 console.error('Fetch error:', error);
53 } finally {
54 setIsLoading(false);
130 error,
131 paymentMethodFilter,
132 fetchSalesData,
133 filterByCashPayment,
134 filterByBankPayment,
144 error,
145 paymentMethodFilter,
146 fetchSalesData,
147 filterByCashPayment,
148 filterByBankPayment,
174 const startDate = new Date();
175 startDate.setDate(startDate.getDate() - 6);
176 fetchSalesData(startDate, endDate);
177 }, []);
178
197 <View className='mb-6'>
198 <DateRangeSelector
199 onDateRangeChange={fetchSalesData}
200 additionalButtons={paymentMethodButtons}
201 />

cerebras_coderindex.ts1 match

@w3b•Updated 1 week ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

plantprofileindex.ts1 match

@seipatiannah1•Updated 1 week ago
27
28// Export the app for HTTP val
29export default app.fetch;

plantprofileApp.tsx10 matches

@seipatiannah1•Updated 1 week ago
25 const [isEditing, setIsEditing] = useState(false);
26
27 // Fetch all plants on component mount
28 useEffect(() => {
29 fetchPlants();
30 }, []);
31
32 const fetchPlants = async () => {
33 try {
34 setIsLoading(true);
35 const response = await fetch("/api/plants");
36 const data = await response.json();
37
39 setPlants(data.data || []);
40 } else {
41 setError(data.error || "Failed to fetch plants");
42 }
43 } catch (err) {
52 try {
53 setIsLoading(true);
54 const response = await fetch(`/api/plants/${id}`);
55 const data = await response.json();
56
58 setSelectedPlant(data.data);
59 } else {
60 setError(data.error || "Failed to fetch plant details");
61 }
62 } catch (err) {
71 try {
72 setIsLoading(true);
73 const response = await fetch("/api/plants", {
74 method: "POST",
75 headers: {
99 try {
100 setIsLoading(true);
101 const response = await fetch(`/api/plants/${id}`, {
102 method: "PUT",
103 headers: {
131 try {
132 setIsLoading(true);
133 const response = await fetch(`/api/plants/${id}`, {
134 method: "DELETE",
135 });

plantprofileplants.ts4 matches

@seipatiannah1•Updated 1 week ago
17 return c.json({ success: true, data: profiles });
18 } catch (error) {
19 console.error("Error fetching plant profiles:", error);
20 return c.json({ success: false, error: "Failed to fetch plant profiles" }, 500);
21 }
22});
37 return c.json({ success: true, data: profile });
38 } catch (error) {
39 console.error("Error fetching plant profile:", error);
40 return c.json({ success: false, error: "Failed to fetch plant profile" }, 500);
41 }
42});

FirstProjectindex.ts1 match

@MiracleSanctuary•Updated 1 week ago
44
45// Export the Hono app
46export default app.fetch;

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 4 days ago

proxyFetch2 file matches

@vidar•Updated 1 week ago