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=132&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 19110 results for "fetch"(6089ms)

rsshubappmain.tsx1 match

@wizos•Updated 3 weeks ago
35 const req = new Request(url, request);
36 try {
37 return await fetch(req);
38 } catch (err) {
39 return new Response(err.stack, { status: 500 });

gif-fcHome.tsx1 match

@moe•Updated 3 weeks ago
105
106async function search(query: string) {
107 return await fetch(`/gif/search?q=${query}`).then((r) => r.json()).then((r) =>
108 r.data
109 )

hevy-workoutsmain.tsx5 matches

@haroon•Updated 3 weeks ago
14 }
15
16 // First, let's fetch available exercise templates to find the correct IDs
17 console.log("Fetching exercise templates from Hevy...");
18
19 const exerciseResponse = await fetch(
20 "https://api.hevyapp.com/v1/exercise_templates?limit=1000",
21 {
29 if (!exerciseResponse.ok) {
30 return {
31 error: "Failed to fetch exercise templates",
32 details: await exerciseResponse.text(),
33 instructions:
584 // Function to create a routine
585 const createRoutine = async (routineData: any) => {
586 const response = await fetch("https://api.hevyapp.com/v1/routines", {
587 method: "POST",
588 headers: {

countersignLOImain.tsx2 matches

@kylevalon•Updated 3 weeks ago
415 try {
416 // Submit countersignature
417 const response = await fetch('${url.origin}/countersignLOI', {
418 method: 'POST',
419 headers: { 'Content-Type': 'application/json' },
662 ];
663
664 await fetch("https://api.resend.com/emails", {
665 method: "POST",
666 headers: {

sendSignedLOImain.tsx2 matches

@kylevalon•Updated 3 weeks ago
157
158 // Send via Resend API
159 const valonEmailRes = await fetch("https://api.resend.com/emails", {
160 method: "POST",
161 headers: {
250
251 // Send confirmation to Guild
252 const guildEmailRes = await fetch("https://api.resend.com/emails", {
253 method: "POST",
254 headers: {

campymain.tsx3 matches

@join•Updated 3 weeks ago
49 name: "get_current_events",
50 description:
51 "Fetches the top 5 recent news headlines for a given topic to inform strategy. Uses a simulated news feed.",
52 parameters: {
53 type: "object" as const,
121}
122
123// A simulated news fetcher. In a real scenario, this would call a News API.
124function get_current_events(topic: string) {
125 const headlines = [
287
288 try {
289 const res = await fetch(\`\${API_URL}?action=chat\`, {
290 method: 'POST',
291 headers: { 'Content-Type': 'application/json' },
940 try {
941 console.log('Making AI suggestions API request with language:', currentLanguage);
942 const response = await fetch('/ai/suggest-team-names', {
943 method: 'POST',
944 headers: {
1084 };
1085
1086 const response = await fetch('/quiz-registration', {
1087 method: 'POST',
1088 headers: {

ganeshotsav-2025-formstemplate.ts1 match

@prashamtrivedi•Updated 3 weeks ago
818 }
819
820 const response = await fetch('', {
821 method: 'POST',
822 body: formData

blob_adminmain.tsx1 match

@psuechti•Updated 3 weeks ago
151
152app.onError((err) => Promise.reject(err));
153export default liveReload(lastlogin(app.fetch), import.meta.url);

automain.tsx14 matches

@join•Updated 3 weeks ago
463 this.router.handle();
464 },
465 async fetchAPI(endpoint, options = {}) {
466 const res = await fetch(new URL(endpoint, "${sourceUrl}"), options);
467 if (!res.ok) throw new Error(\`API Error: \${res.status} on \${endpoint}\`);
468 const contentType = res.headers.get("content-type");
528
529 try {
530 const res = await App.fetchAPI('/api/gather', {
531 method: 'POST', headers: { 'Content-Type': 'application/json' },
532 body: JSON.stringify({ task, domain, history: App.state.conversationHistory }) // CORRECTED: Use App.state
562
563 try {
564 const res = await App.fetchAPI('/api/gather', {
565 method: 'POST', headers: { 'Content-Type': 'application/json' },
566 body: JSON.stringify({
596 const { task, occupation } = App.state.selections;
597 // First, get the refined prompt
598 const promptRes = await App.fetchAPI('/api/prompt/dynamic', {
599 method: 'POST',
600 headers: {'Content-Type': 'application/json'},
649
650 try {
651 const res = await App.fetchAPI('/api/execute-stream', {
652 method: 'POST', headers: {'Content-Type': 'application/json'},
653 body: JSON.stringify({ refined_prompt: App.state.refinedPrompt, user_inputs, company_context: App.state.companyContext }),
671 // 1. Generate Criteria
672 evalContainer.innerHTML = \`<h2 class="text-xl font-bold text-slate-900"><span class="text-violet-500">Step 2:</span> AI Evaluation</h2><div id="evaluation-content" class="mt-4 space-y-4"><p class="text-slate-500">Generating evaluation criteria...</p></div>\`;
673 const criteriaRes = await App.fetchAPI('/api/generate-criteria', {
674 method: 'POST', headers: {'Content-Type': 'application/json'},
675 body: JSON.stringify({ refined_prompt: App.state.refinedPrompt, company_context: App.state.companyContext }),
681 const evalCritiqueEl = getEl('eval-critique');
682 evalCritiqueEl.innerHTML = '<p class="text-slate-500">Evaluating draft against criteria...</p>';
683 const evalRes = await App.fetchAPI('/api/evaluate-output', {
684 method: 'POST', headers: {'Content-Type': 'application/json'},
685 body: JSON.stringify({ refined_prompt: App.state.refinedPrompt, raw_output: App.state.rawOutputV1, criteria: App.state.criteria, language: App.state.companyContext.language }),
700 <div id="v2-diff-content" class="mt-4 prose max-w-none hidden font-mono text-sm leading-relaxed"></div>
701 \`;
702 const refineRes = await App.fetchAPI('/api/refine-output', {
703 method: 'POST', headers: {'Content-Type': 'application/json'},
704 body: JSON.stringify({ refined_prompt: App.state.refinedPrompt, raw_output: App.state.rawOutputV1, evaluation: JSON.parse(App.state.evaluationResult), language: App.state.companyContext.language }),
742 };
743
744 const reevalRes = await App.fetchAPI('/api/reevaluate-output', {
745 method: 'POST',
746 headers: {'Content-Type': 'application/json'},
828 renderUI: {
829 sidebar: async () => {
830 const industriesList = await App.fetchAPI('/api/industries');
831 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>\`;
832 industriesList.forEach(industry => {
928 App.router.updateSidebarUI(industry, occupationName);
929 const occupation = App.state.cache[\`occupations-\${industry}\`]?.find(o => o.name === occupationName) || { name: occupationName, description: '' };
930 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);
931 App.state.cache[\`tasks-\${occupationName}\`] = tasks;
932 App.renderUI.tasks(tasks, occupation, industry);
940 App.showScreen('tasks');
941 App.router.updateSidebarUI(industry);
942 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);
943 App.state.cache[\`occupations-\${industry}\`] = occupations;
944 App.renderUI.occupations(occupations, industry);
1302
1303// --- EXPORT THE VAL ---
1304export default app.fetch;
bible

bible2 file matches

@cameronpak•Updated 2 hours ago
fetch(bible) - one-liner Bible reader

FetchBasic2 file matches

@bengold•Updated 2 weeks ago