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/$2?q=fetch&page=3&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 10800 results for "fetch"(388ms)

TownieREADME.md1 match

@valdottown•Updated 4 hours ago
8
9- **AI-Assisted Editing**: Chat with Claude 4 Sonnet about your code and let it make changes directly to your project files
10- **Fetch tool**: Townie is able to make HTTP calls to your HTTP services to test them and continue iterating
11- **Branch Management**: View, select, and create branches without leaving the app
12- **Sound Notifications**: Get alerted when Claude finishes responding
102 try {
103 // Get open issues from GitHub
104 const openIssues = await fetchOpenIssues();
105
106 // Use LLM to find semantically related issues
188
189/**
190 * Fetch all open issues from GitHub repository using Octokit
191 */
192async function fetchOpenIssues(): Promise<any[]> {
193 const githubToken = Deno.env.get("GITHUB_TOKEN");
194 const githubRepo = Deno.env.get("GITHUB_REPO");
215 const perPage = 100;
216
217 // Fetch all open issues using Octokit
218 while (true) {
219 const response = await octokit.rest.issues.listForRepo({
239 return allIssues;
240 } catch (error) {
241 console.error("Error fetching issues with Octokit:", error);
242 return [];
243 }

reactHonoStarterindex.ts2 matches

@lightweight•Updated 5 hours 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-4654main.tsx2 matches

@dhanush_tnva•Updated 6 hours ago
32 // Chat Completions (POST /v1/chat/completions)
33 try {
34 const response: any = await fetch("https://api.sarvam.ai/v1/chat/completions", {
35 method: "POST",
36 headers: {
73});
74
75export default app.fetch;

Smart_Expense_TrackerTravelPlanner.tsx5 matches

@gunjana_04•Updated 6 hours ago
17 const [user, setUser] = useState<any>(null);
18
19 const fetchData = async () => {
20 try {
21 setLoading(true);
22 const [destinationsRes, userRes] = await Promise.all([
23 fetch('/api/goals/travel-destinations'),
24 fetch('/api/user/profile')
25 ]);
26
48
49 useEffect(() => {
50 fetchData();
51 }, [refreshTrigger]);
52
64
65 try {
66 const response = await fetch('/api/goals', {
67 method: 'POST',
68 headers: {

Smart_Expense_TrackerGoalTracker.tsx10 matches

@gunjana_04•Updated 6 hours ago
23 const [addingMoney, setAddingMoney] = useState<{ goalId: number; amount: string } | null>(null);
24
25 const fetchGoals = async () => {
26 try {
27 setLoading(true);
28 const response = await fetch('/api/goals');
29 const data = await response.json();
30 if (data.success) {
35 type: 'error',
36 title: 'Error',
37 message: 'Failed to fetch goals'
38 });
39 } finally {
43
44 useEffect(() => {
45 fetchGoals();
46 }, [refreshTrigger]);
47
68
69 try {
70 const response = await fetch('/api/goals', {
71 method: 'POST',
72 headers: {
95 setShowForm(false);
96 onRefresh();
97 fetchGoals();
98 } else {
99 onNotification({
123
124 try {
125 const response = await fetch(`/api/goals/${goalId}/progress`, {
126 method: 'POST',
127 headers: {
142 setAddingMoney(null);
143 onRefresh();
144 fetchGoals();
145 } else {
146 onNotification({
165
166 try {
167 const response = await fetch(`/api/goals/${goalId}`, {
168 method: 'DELETE',
169 });
178 });
179 onRefresh();
180 fetchGoals();
181 } else {
182 onNotification({

Smart_Expense_TrackerExpenseForm.tsx7 matches

@gunjana_04•Updated 6 hours ago
20 const [quickAmounts] = useState([50, 100, 200, 500, 1000]);
21
22 const fetchRecentExpenses = async () => {
23 try {
24 const response = await fetch('/api/expenses?limit=10');
25 const data = await response.json();
26 if (data.success) {
28 }
29 } catch (error) {
30 console.error('Failed to fetch recent expenses:', error);
31 }
32 };
33
34 useEffect(() => {
35 fetchRecentExpenses();
36 }, [refreshTrigger]);
37
60
61 try {
62 const response = await fetch('/api/expenses', {
63 method: 'POST',
64 headers: {
114
115 try {
116 const response = await fetch(`/api/expenses/${expenseId}`, {
117 method: 'DELETE',
118 });
127 });
128 onRefresh();
129 fetchRecentExpenses();
130 } else {
131 onNotification({

Smart_Expense_TrackerDashboard.tsx7 matches

@gunjana_04•Updated 6 hours ago
19 });
20
21 const fetchDashboardData = async () => {
22 try {
23 setLoading(true);
24
25 const [monthlyReportRes, expensesRes, goalsRes, insightsRes, userRes] = await Promise.all([
26 fetch('/api/analytics/monthly-report'),
27 fetch('/api/expenses?limit=5'),
28 fetch('/api/goals'),
29 fetch('/api/analytics/insights'),
30 fetch('/api/user/profile')
31 ]);
32
58
59 useEffect(() => {
60 fetchDashboardData();
61 }, [refreshTrigger]);
62

Smart_Expense_Trackerindex.ts1 match

@gunjana_04•Updated 6 hours ago
84 // For SPA, serve index.html for all non-API routes
85 if (!c.req.path.startsWith("/api/")) {
86 return app.fetch(new Request(new URL("/", c.req.url)));
87 }
88

Smart_Expense_Trackeruser.ts2 matches

@gunjana_04•Updated 6 hours ago
24 return c.json({
25 success: false,
26 error: "Failed to fetch user profile"
27 }, 500);
28 }
82 return c.json({
83 success: false,
84 error: "Failed to fetch budgets"
85 }, 500);
86 }

HN-fetch-call2 file matches

@ImGqb•Updated 7 hours ago
fetch HackerNews by API

FRAMERFetchBasic1 file match

@bresnik•Updated 1 day ago