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/$%7BsvgDataUrl%7D?q=fetch&page=1&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 14053 results for "fetch"(6111ms)

cardamonRecipeForm.tsx2 matches

@connnolly•Updated 32 mins ago
123 }
124
125 const response = await fetch(endpoint, {
126 method: 'POST',
127 headers: { 'Content-Type': 'application/json' },
201 const method = isEditing ? 'PUT' : 'POST';
202
203 const response = await fetch(url, {
204 method,
205 headers: { 'Content-Type': 'application/json' },

brokenLinkCrawlercheckLink.tsx1 match

@willthereader•Updated 39 mins ago
1export async function checkLink(link) {
2 const linksMetaData = await fetch(link, {
3 method: "HEAD",
4 headers: {

cardamonindex.ts1 match

@connnolly•Updated 39 mins ago
100
101// This is the entry point for HTTP vals
102export default app.fetch;

cardamonparse.ts3 matches

@connnolly•Updated 58 mins ago
163 const { content: url } = await c.req.json() as ParseRequest;
164
165 // Fetch the webpage content
166 const response = await fetch(url);
167 if (!response.ok) {
168 return c.json({ success: false, error: 'Failed to fetch URL' } as ParseResponse);
169 }
170

brokenLinkCrawlerurlGetter.tsx1 match

@willthereader•Updated 1 hour ago
1export async function urlGetter(sourceURl) {
2 const response = await fetch(sourceURl);
3 const html = await response.text();
4 const matches = [...html.matchAll(/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g)].map((match) => match[1]);

huyhieumain.js2 matches

@lanly•Updated 1 hour ago
25});
26
27export default app.fetch;
28Deno.serve(app.fetch);

cardamonRecipeView.tsx1 match

@connnolly•Updated 1 hour ago
34 const handleDelete = async () => {
35 try {
36 const response = await fetch(`/api/recipes/${recipe.id}`, {
37 method: 'DELETE'
38 });

cardamonRecipeList.tsx1 match

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

cardamonApp.tsx1 match

@connnolly•Updated 1 hour ago
33 setState(prev => ({ ...prev, loading: true, error: null }));
34 try {
35 const response = await fetch('/api/recipes');
36 const data = await response.json();
37

cardamonrecipes.ts4 matches

@connnolly•Updated 1 hour ago
30 return c.json({ success: true, data: recipes } as ApiResponse<Recipe[]>);
31 } catch (error) {
32 console.error('Error fetching recipes:', error);
33 return c.json({ success: false, error: 'Failed to fetch recipes' } as ApiResponse, 500);
34 }
35});
50 return c.json({ success: true, data: recipe } as ApiResponse<Recipe>);
51 } catch (error) {
52 console.error('Error fetching recipe:', error);
53 return c.json({ success: false, error: 'Failed to fetch recipe' } as ApiResponse, 500);
54 }
55});

FetchBasic2 file matches

@ther•Updated 6 days ago

GithubPRFetcher

@andybak•Updated 1 week ago