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/$%7Burl%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 17204 results for "fetch"(785ms)

falVideoFetcher1 file match

@hellojakejohn•Updated 13 hours ago

Parallel-fetch1 file match

@stevekrouse•Updated 3 days ago

readwise-instapaper1 file match

@welson•Updated 2 weeks ago
Fetches my articles from Readwise. Syncs with/ Neon + Instapaper

manual-fetcher

@miz•Updated 1 month ago

fake-https1 file match

@blazemcworld•Updated 1 month ago
simple proxy to fetch http urls using https

testWeatherFetcher1 file match

@sjaskeprut•Updated 1 month ago

weatherFetcher1 file match

@sjaskeprut•Updated 1 month ago

FetchBasic2 file matches

@ther•Updated 2 months ago

GithubPRFetcher

@andybak•Updated 2 months ago

proxiedfetch1 file match

@jayden•Updated 2 months ago

SnippetsApp.jsx8 matches

@n4k0m3•Updated 57 mins ago
231 }, [theme]);
232
233 // Function to fetch snippets from the API
234 const fetchSnippets = async () => {
235 if (!config.url || !config.token) {
236 showNotification(
249 if (response && response.CONTENT) {
250 // The API returns the content encoded in Base64, so we decode it.
251 const fetchedSnippets = Object.values(response.CONTENT).map(
252 (snippet) => ({
253 ...snippet,
255 }),
256 );
257 setSnippets(fetchedSnippets);
258 showNotification(
259 language.notification_snippets_loaded_success,
277 // Load snippets on initial render and when config changes
278 useEffect(() => {
279 fetchSnippets();
280 }, [api, config, currentLang]);
281
355 );
356 }
357 await fetchSnippets(); // Refresh snippets
358 setSnippetToEdit(null);
359 } catch (e) {
381 "success",
382 );
383 await fetchSnippets(); // Refresh snippets
384 setShowConfirmDelete(false);
385 } catch (e) {
560 );
561 }
562 await fetchSnippets(); // Refresh snippets
563 onSuccess();
564 } catch (e) {

Agentivemain.tsx11 matches

@join•Updated 1 hour ago
325 this.router.handle();
326 },
327 fetchAPI: async (endpoint, options = {}) => {
328 const res = await fetch(new URL(endpoint, "${sourceUrl}"), options);
329 if (!res.ok) throw new Error(\`API Error: \${res.status} on \${endpoint}\`);
330 const contentType = res.headers.get("content-type");
362 renderUI: {
363 sidebar: async () => {
364 const industriesList = await App.fetchAPI('/api/industries');
365 let html = \`<div class="space-y-1"><h3 class="px-2 text-xs font-semibold text-slate-400 uppercase tracking-wider sidebar-text">Categories</h3>\`;
366 industriesList.forEach(industry => {
445
446 try {
447 const promptRes = await App.fetchAPI('/api/prompt/dynamic', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ occupation_title: occupationName, task: taskName, company_context: App.state.companyContext }) });
448 App.state.refinedPrompt = promptRes.refined_prompt;
449 const [inputsRes, clarifyRes] = await Promise.all([
450 App.fetchAPI('/api/inputs', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ refined_prompt: App.state.refinedPrompt }) }),
451 App.fetchAPI('/api/clarify', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ refined_prompt: App.state.refinedPrompt }) })
452 ]);
453 App.state.formFields = inputsRes.inputs;
462 App.router.updateSidebarUI(industry, occupationName);
463 const occupation = App.state.cache[\`occupations-\${industry}\`]?.find(o => o.name === occupationName) || { name: occupationName, description: '' };
464 const tasks = await App.fetchAPI('/api/generate/tasks', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ occupation: occupation.name, company_context: App.state.companyContext }) }).then(data => data.generated_list);
465 App.state.tasks = tasks;
466 App.state.cache[\`tasks-\${occupationName}\`] = tasks;
472 App.showScreen('tasks');
473 App.router.updateSidebarUI(industry);
474 const occupations = await App.fetchAPI('/api/generate/occupations', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ industry, company_context: App.state.companyContext }) }).then(data => data.generated_list);
475 App.state.cache[\`occupations-\${industry}\`] = occupations;
476 App.renderUI.occupations(occupations, industry);
521
522 try {
523 const res = await this.fetchAPI('/api/execute-stream', {
524 method: 'POST', headers: {'Content-Type': 'application/json'},
525 body: JSON.stringify({ refined_prompt: this.state.refinedPrompt, user_inputs: userInputs, clarifications, company_context: this.state.companyContext }),
541 formattingStatus.textContent = 'Formatting...';
542
543 const formatRes = await this.fetchAPI('/api/format-html', {
544 method: 'POST', headers: {'Content-Type': 'application/json'},
545 body: JSON.stringify({ raw_text: fullText })
749
750// --- EXPORT THE VAL ---
751export default app.fetch;