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=789&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 18968 results for "fetch"(4414ms)

untitled-9443index.ts1 match

@Deep_25•Updated 3 months ago
50app.get("/health", c => c.json({ status: "ok", timestamp: new Date().toISOString() }));
51
52export default app.fetch;

reactHonoStarterindex.ts2 matches

@angeltapes•Updated 3 months ago
21});
22
23// HTTP vals expect an exported "fetch handler"
24// This is how you "run the server" in Val Town with Hono
25export default app.fetch;

untitled-3305main.tsx3 matches

@anime_enjoyer•Updated 3 months ago
22let output = [];
23
24const fetchGames = async () => {
25 for (let i = 0; i < games.length; i++) {
26 try {
27 await new Promise(resolve => setTimeout(resolve, 500));
28 const response = await fetch(
29 `https://api.isthereanydeal.com/games/lookup/v1?key=84bc1a6d1fea2c23ad9bf0c85a07a3cdf6c15568&appid=${games[i]}`,
30 );
38};
39
40fetchGames();
198});
199
200export default app.fetch;
201
197});
198
199export default app.fetch;
200
198});
199
200export default app.fetch;
201
197});
198
199export default app.fetch;
200

lastlogin_demomain.tsx1 match

@stevekrouse•Updated 3 months ago
33});
34
35export default lastlogin(app.fetch);

canteenTablesPanel.tsx8 matches

@Pratham211•Updated 3 months ago
15
16 useEffect(() => {
17 fetchTables();
18 }, []);
19
20 const fetchTables = async () => {
21 try {
22 const response = await fetch('/api/tables');
23 if (response.ok) {
24 const data = await response.json();
25 setTables(data);
26 } else {
27 console.error('Failed to fetch tables');
28 }
29 } catch (error) {
30 console.error('Error fetching tables:', error);
31 } finally {
32 setLoading(false);
38
39 try {
40 const response = await fetch('/api/tables', {
41 method: 'POST',
42 headers: {
47
48 if (response.ok) {
49 await fetchTables();
50 resetForm();
51 setShowAddForm(false);
73 const downloadQRCode = async (table: Table) => {
74 try {
75 const response = await fetch(`/api/tables/${table.id}/qr/image`);
76 if (response.ok) {
77 const blob = await response.blob();

canteenMenuPanel.tsx9 matches

@Pratham211•Updated 3 months ago
21
22 useEffect(() => {
23 fetchMenuItems();
24 }, []);
25
26 const fetchMenuItems = async () => {
27 try {
28 const response = await fetch('/api/menu');
29 if (response.ok) {
30 const data = await response.json();
31 setMenuItems(data);
32 } else {
33 console.error('Failed to fetch menu items');
34 }
35 } catch (error) {
36 console.error('Error fetching menu items:', error);
37 } finally {
38 setLoading(false);
47 const method = editingItem ? 'PUT' : 'POST';
48
49 const response = await fetch(url, {
50 method,
51 headers: {
56
57 if (response.ok) {
58 await fetchMenuItems();
59 resetForm();
60 setShowAddForm(false);
74
75 try {
76 const response = await fetch(`/api/menu/${id}`, {
77 method: 'DELETE'
78 });
79
80 if (response.ok) {
81 await fetchMenuItems();
82 } else {
83 const error = await response.json();

FetchBasic2 file matches

@bengold•Updated 2 weeks ago

fetch1 file match

@raify•Updated 2 weeks ago