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=125&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 15231 results for "fetch"(2023ms)

Sketch_IdeasColoursViewer.tsx1 match

@tvhees•Updated 3 weeks ago
9
10 useEffect(() => {
11 fetch("/api/colours")
12 .then(res => res.json())
13 .then(data => {

GenerateResponsesGenerateResponses.ts1 match

@Dentalabcs•Updated 3 weeks ago
17 let aiResponse = "Sorry, something went wrong.";
18 try {
19 const openaiRes = await fetch("https://api.openai.com/v1/chat/completions", {
20 method: "POST",
21 headers: {

huyhieu.cursorrules3 matches

@lanly•Updated 3 weeks ago
239
240 // Inject data to avoid extra round-trips
241 const initialData = await fetchInitialData();
242 const dataScript = `<script>
243 window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
286
2875. **API Design:**
288 - `fetch` handler is the entry point for HTTP vals
289 - Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`
290
291

huyhieumain.http1 match

@lanly•Updated 3 weeks ago
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;
7

huyhieu.cursorrules3 matches

@lanly•Updated 3 weeks ago
239
240 // Inject data to avoid extra round-trips
241 const initialData = await fetchInitialData();
242 const dataScript = `<script>
243 window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
286
2875. **API Design:**
288 - `fetch` handler is the entry point for HTTP vals
289 - Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`
290
291

underwritingmain.tsx3 matches

@legal•Updated 3 weeks ago
649 const formData = new FormData();
650 formData.append('documentFile', file, file.name);
651 const res = await fetch(\`\${window.location.pathname}?action=suggestTasks&format=json\`, { method: 'POST', body: formData });
652 const data = await res.json().catch(() => { throw new Error(\`Server error: \${res.status}. Invalid JSON.\`); });
653 if (!res.ok || data.error) throw new Error(data.error || \`Server error: \${res.status}\`);
685 formData.append('inputSourceDescription', currentAnalysisSession.docSource);
686
687 const res = await fetch(\`\${window.location.pathname}?format=json\`, { method: 'POST', body: formData });
688 const data = await res.json().catch(() => { throw new Error(\`Server error: \${res.status}. Invalid JSON.\`); });
689 if (!res.ok || data.error) throw new Error(JSON.stringify(data.error || data.details) || \`Server error: \${res.status}\`);
711 formData.append('guidelines', guidelinesString);
712
713 const res = await fetch(\`\${window.location.pathname}?action=runCoPilot&format=json\`, { method: 'POST', body: formData });
714 const data = await res.json().catch(() => { throw new Error(\`Server error: \${res.status}. Invalid JSON.\`); });
715 if (!res.ok || data.error) throw new Error(data.error || \`Server error: \${res.status}\`);

reactHonoStarterindex.ts2 matches

@lanly•Updated 3 weeks 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;

Shivaindex.ts1 match

@Shiva_gupta•Updated 3 weeks ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

cerebras_coderindex.ts1 match

@Shiva_gupta•Updated 3 weeks ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({

readwise-ingesterreadwise-bot.ts7 matches

@thesolarmonk•Updated 3 weeks ago
60}
61
62// Fetch documents from Readwise API
63async function fetchReadwiseShortlist(): Promise<ReadwiseDocument[]> {
64 const token = Deno.env.get('READWISE_TOKEN');
65 if (!token) {
80 console.log('Making Readwise API request with params:', queryParams.toString());
81
82 const response = await fetch(`https://readwise.io/api/v3/list/?${queryParams.toString()}`, {
83 method: 'GET',
84 headers: {
95 nextPageCursor = responseJson.nextPageCursor;
96
97 console.log(`Fetched ${responseJson.results.length} documents, total: ${fullData.length}`);
98
99 if (!nextPageCursor) {
192 console.log('Database initialized');
193
194 // Fetch shortlist documents
195 const documents = await fetchReadwiseShortlist();
196 console.log(`Fetched ${documents.length} documents from Readwise shortlist`);
197
198 if (documents.length === 0) {

fake-https1 file match

@blazemcworld•Updated 6 days ago
simple proxy to fetch http urls using https

testWeatherFetcher1 file match

@sjaskeprut•Updated 2 weeks ago