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=9&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 14090 results for "fetch"(2105ms)

196 }
197
198 const response = await fetch(
199 `${config.apiBase}/v2/vals/${valId}/files/content${queryParams}`,
200 {
42 // For blobs, we need to handle binary data differently
43 const url = `${config.apiBase}/v1/blob/${encodeURIComponent(key)}`
44 const response = await fetch(url, {
45 headers: {
46 "Authorization": `Bearer ${config.apiToken}`,
110
111 const url = `${config.apiBase}/v1/blob/${encodeURIComponent(key)}`
112 const response = await fetch(url, {
113 method: "POST",
114 headers: {

Glancerindex.ts1 match

@lightweight•Updated 1 day ago
42});
43
44export default app.fetch;
45

Sketch_IdeasStylesViewer.tsx1 match

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

Sketch_Ideasindex.ts2 matches

@tvhees•Updated 1 day ago
25});
26
27// HTTP vals expect an exported "fetch handler"
28// This is how you "run the server" in Val Town with Hono
29export default app.fetch;

Sketch_IdeasColoursViewer.tsx1 match

@tvhees•Updated 1 day ago
9
10 useEffect(() => {
11 fetch("/api/colours")
12 .then(res => res.json())
13 .then(data => {
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 1 day 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 1 day 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 1 day 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

FetchBasic2 file matches

@ther•Updated 1 week ago

GithubPRFetcher

@andybak•Updated 1 week ago