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=214&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 13561 results for "fetch"(988ms)

ShippingrevolutionDashboard.tsx1 match

@Shsragab•Updated 5 days ago
21 const loadRecentShipments = async () => {
22 try {
23 const response = await fetch('/api/shipments?limit=5');
24 const result = await response.json();
25 if (result.success) {

townindex.ts4 matches

@twambie•Updated 5 days ago
34 html = html.replace("</head>", `${dataScript}</head>`);
35 } catch (error) {
36 // If there's an error fetching initial data, just serve the page without it
37 console.error("Failed to fetch initial data:", error);
38 }
39
41});
42
43export default app.fetch;
44
45export default app.fetch;

ShippingrevolutionApp.tsx1 match

@Shsragab•Updated 5 days ago
29 const loadDashboardStats = async () => {
30 try {
31 const response = await fetch('/api/tracking/dashboard/stats');
32 const result = await response.json();
33 if (result.success) {

untitled-1512index.ts1 match

@Lucy•Updated 5 days ago
35});
36
37export default app.fetch;

townbusinesses.ts1 match

@twambie•Updated 5 days ago
27 return c.json({
28 success: false,
29 error: "Failed to fetch businesses"
30 }, 500);
31 }

untitled-1512ChatRoom.tsx8 matches

@Lucy•Updated 5 days ago
13
14 useEffect(() => {
15 fetchMessages();
16 // Set up polling for new messages every 3 seconds
17 const interval = setInterval(fetchMessages, 3000);
18 return () => clearInterval(interval);
19 }, []);
39 };
40
41 const fetchMessages = async () => {
42 try {
43 const response = await fetch('/api/chat/messages');
44 const result = await response.json();
45
47 setMessages(result.data);
48 } else {
49 setError(result.error || 'Failed to fetch messages');
50 }
51 } catch (err) {
64
65 try {
66 const response = await fetch('/api/chat/messages', {
67 method: 'POST',
68 headers: {
79 if (result.success) {
80 setNewMessage('');
81 // Fetch messages immediately to show the new message
82 await fetchMessages();
83 } else {
84 setError(result.error || 'Failed to send message');

untitled-1512JobBoard.tsx5 matches

@Lucy•Updated 5 days ago
11
12 useEffect(() => {
13 fetchJobs();
14 }, []);
15
16 const fetchJobs = async () => {
17 try {
18 const response = await fetch('/api/jobs');
19 const result = await response.json();
20
22 setJobs(result.data);
23 } else {
24 setError(result.error || 'Failed to fetch jobs');
25 }
26 } catch (err) {
42
43 try {
44 const response = await fetch(`/api/jobs/${jobId}`, {
45 method: 'DELETE',
46 });

townBusList.tsx1 match

@twambie•Updated 5 days ago
18 setDeletingId(id);
19 try {
20 const response = await fetch(`/api/buses/${id}`, {
21 method: "DELETE",
22 });

untitled-1512JobForm.tsx1 match

@Lucy•Updated 5 days ago
26
27 try {
28 const response = await fetch('/api/jobs', {
29 method: 'POST',
30 headers: {

townBusForm.tsx1 match

@twambie•Updated 5 days ago
29
30 try {
31 const response = await fetch("/api/buses", {
32 method: "POST",
33 headers: {

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago