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/$%7Bsuccess?q=fetch&page=2&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 14499 results for "fetch"(1867ms)

luciaMagicLinkStarterLoginForm.tsx1 match

@shapedlines•Updated 7 hours ago
22
23 try {
24 const response = await fetch("/auth/magic-link", {
25 method: "POST",
26 headers: {

luciaMagicLinkStarterindex.ts2 matches

@shapedlines•Updated 7 hours ago
77});
78
79// HTTP vals expect an exported "fetch handler"
80// This is how you "run the server" in Val Town with Hono
81export default app.fetch;

cardamomshopping-lists.ts4 matches

@connnolly•Updated 7 hours ago
19 return c.json({ success: true, data: lists } as ApiResponse<ShoppingList[]>);
20 } catch (error) {
21 console.error('Error fetching shopping lists:', error);
22 return c.json({ success: false, error: 'Failed to fetch shopping lists' } as ApiResponse, 500);
23 }
24});
39 return c.json({ success: true, data: list } as ApiResponse<ShoppingList>);
40 } catch (error) {
41 console.error('Error fetching shopping list:', error);
42 return c.json({ success: false, error: 'Failed to fetch shopping list' } as ApiResponse, 500);
43 }
44});

cardamomshopping-lists-simple.ts2 matches

@connnolly•Updated 8 hours ago
23 return c.json({ success: true, data: result });
24 } catch (error) {
25 console.error('Error fetching shopping lists:', error);
26 return c.json({ success: false, error: 'Failed to fetch shopping lists' }, 500);
27 }
28});

cardamomApp.tsx2 matches

@connnolly•Updated 9 hours ago
40 setState(prev => ({ ...prev, loading: true, error: null }));
41 try {
42 const response = await fetch('/api/recipes');
43 const data = await response.json();
44
68 setState(prev => ({ ...prev, loading: true, error: null }));
69 try {
70 const response = await fetch('/api/shopping-lists');
71 const data = await response.json();
72

cardamomRecipeList.tsx1 match

@connnolly•Updated 9 hours ago
50 const handleDelete = async (recipeId: number) => {
51 try {
52 const response = await fetch(`/api/recipes/${recipeId}`, {
53 method: 'DELETE'
54 });

cardamomShoppingListView.tsx2 matches

@connnolly•Updated 9 hours ago
16 setLoading(true);
17 try {
18 const response = await fetch(`/api/shopping-lists/items/${itemId}`, {
19 method: 'PUT',
20 headers: {
47 setLoading(true);
48 try {
49 const response = await fetch(`/api/shopping-lists/${shoppingList.id}`, {
50 method: 'DELETE',
51 });

cardamomShoppingListCreator.tsx1 match

@connnolly•Updated 9 hours ago
42
43 try {
44 const response = await fetch('/api/shopping-lists', {
45 method: 'POST',
46 headers: {

cardamomREADME.md1 match

@connnolly•Updated 9 hours ago
131- **PDF**: Uses `unpdf` library for text extraction
132- **Images**: Leverages OpenAI Vision API for OCR
133- **URLs**: Fetches and parses HTML content
134- **Text**: Direct text processing
135

cardamomparse.ts3 matches

@connnolly•Updated 9 hours ago
166 const { content: url } = await c.req.json() as ParseRequest;
167
168 // Fetch the webpage content
169 const response = await fetch(url);
170 if (!response.ok) {
171 return c.json({ success: false, error: "Failed to fetch URL" } as ParseResponse);
172 }
173

testWeatherFetcher1 file match

@sjaskeprut•Updated 2 days ago

weatherFetcher1 file match

@sjaskeprut•Updated 2 days ago