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=126&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 9548 results for "fetch"(1202ms)

testtownieindex.ts1 match

@charmaine•Updated 1 week ago
39
40// Export the Hono app for HTTP val
41export default app.fetch;

testtownieindex.tsx8 matches

@charmaine•Updated 1 week ago
35
36 React.useEffect(() => {
37 async function fetchPosts() {
38 try {
39 const response = await fetch('/api/posts');
40 if (!response.ok) {
41 throw new Error('Failed to fetch posts');
42 }
43 const data = await response.json();
51 }
52
53 fetchPosts();
54 }, []);
55
82
83 React.useEffect(() => {
84 async function fetchPost() {
85 if (!slug) return;
86
87 try {
88 const response = await fetch(`/api/posts/${slug}`);
89 if (response.status === 404) {
90 navigate('/not-found');
92 }
93 if (!response.ok) {
94 throw new Error('Failed to fetch post');
95 }
96 const data = await response.json();
104 }
105
106 fetchPost();
107 }, [slug, navigate]);
108

testtownieposts.ts6 matches

@charmaine•Updated 1 week ago
18 return c.json(response);
19 } catch (error) {
20 console.error("Error fetching posts:", error);
21 return c.json({ error: "Failed to fetch posts" }, 500);
22 }
23});
38 return c.json(response);
39 } catch (error) {
40 console.error("Error fetching post:", error);
41 return c.json({ error: "Failed to fetch post" }, 500);
42 }
43});
52 return c.json(response);
53 } catch (error) {
54 console.error("Error fetching tags:", error);
55 return c.json({ error: "Failed to fetch tags" }, 500);
56 }
57});
413 // Update todo status
414 try {
415 const response = await fetch('/api/todos/' + todoId, {
416 method: 'PUT',
417 headers: {
671 try {
672 // Submit log data
673 const response = await fetch('/api/log', {
674 method: 'POST',
675 headers: {

nameSeeingServermain.tsx3 matches

@SimeonL•Updated 1 week ago
18 -H 'sec-ch-ua-mobile: ?0' \
19 -H 'sec-ch-ua-platform: "macOS"' \
20 -H 'sec-fetch-dest: empty' \
21 -H 'sec-fetch-mode: cors' \
22 -H 'sec-fetch-site: same-site' \
23 -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
24

CareerCoach20Dayindex.ts1 match

@prashamtrivedi•Updated 1 week ago
5 * Serves the Hono application with routes for dashboard, logs, todos, and leads
6 */
7export default app.fetch
8

aqiutils.ts3 matches

@pepicrft•Updated 1 week ago
1import { blob } from "https://esm.town/v/std/blob?v=12";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { msDay } from "https://esm.town/v/stevekrouse/msDay";
4import { msHour } from "https://esm.town/v/stevekrouse/msHour";
25 lon: number;
26}) => {
27 const { results } = await fetchJSON(
28 `${BASE_URL}/v3/locations?`
29 + new URLSearchParams({
50export async function openAqNowcastAQI(location) {
51 const sensorID = location.sensors.find(s => s.parameter.name === "pm25").id;
52 const data = await fetchJSON(
53 `${BASE_URL}/v3/sensors/${sensorID}/measurements?`
54 + new URLSearchParams({

aqiproxy.ts1 match

@pepicrft•Updated 1 week ago
3export default async function(req: Request): Promise<Response> {
4 const url = new URL(req.url);
5 return fetch(TARGET_URL + url.pathname + url.search, {
6 headers: {
7 "X-API-Key": Deno.env.get("OpenAQ_API_KEY") as string,

aqinominatim.ts2 matches

@pepicrft•Updated 1 week ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function nominatimSearch(params: Search): Promise<Place[]> {
4 return fetchJSON(
5 "https://nominatim.openstreetmap.org/search?"
6 + new URLSearchParams({
GitHub-Release-Notes

GitHub-Release-NotesREADME.md1 match

@charmaine•Updated 1 week ago
17
181. User enters GitHub token, repository information, and date range
192. User clicks "Fetch Commits" to retrieve commit data
203. User reviews commits and associated PR information
214. User clicks "Generate Release Notes" to process commits through LLM

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 15 hours ago

proxyFetch2 file matches

@vidar•Updated 3 days ago