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%20%22Image%20title%22?q=fetch&page=691&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 9289 results for "fetch"(1650ms)

emailmain.tsx1 match

@std•Updated 9 months ago
68 headers?: Record<string, string>;
69}) => {
70 let result = await fetch(
71 `${API_URL}/v1/email`,
72 {

Fetchmain.tsx1 match

@hunty•Updated 9 months ago
10});
11
12export default app.fetch;

date_me_formmain.tsx2 matches

@stevekrouse•Updated 9 months ago
4import date_me_doc_locations from "https://esm.town/v/stevekrouse/date_me_doc_locations";
5import Layout from "https://esm.town/v/stevekrouse/dateme_layout";
6import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
7import { Hono } from "npm:hono@3";
8
224form.get("/", Form);
225form.post("/", Submit);
226export default reloadOnSaveFetchMiddleware(form.fetch);

getValsContextWindowDebugmain.tsx1 match

@janpaul123•Updated 9 months ago
1// This val renders the output of "janpaul123/getValsContextWindow" as HTML
2// It uses React for rendering and includes a <select> for the "model" option
3// The approach is to fetch the context window data, then render it as an interactive HTML page
4
5/** @jsxImportSource https://esm.sh/react */

VALLErunmain.tsx2 matches

@roadlabs•Updated 9 months ago
189 code: newCode,
190 });
191 fetch('/save', { method: "POST", body }).then(() => {
192 document.getElementById('code-input-hidden').value = newCode;
193 document.getElementById('preview-iframe').src += '';
505 app.post("/", mainHandler);
506
507 return passwordAuth(app.fetch, { verifyPassword: verifyToken });
508}

glideImportDemomain.tsx1 match

@dvdsgl•Updated 9 months ago
14const table = "replace-me-abc123-xyz456";
15
16// 4. Implement row fetching using an API or a library:
17//
18// For example, you could call an API in a loop, using yield for each

glidemain.tsx8 matches

@dvdsgl•Updated 9 months ago
48}
49
50// Handles calling fetch, checking for API errors
51function fetchGlide<A>(
52 method: "GET" | "POST" | "PUT",
53 url: string,
57 const { token } = yield* getGlide;
58 const result = yield* Effect.tryPromise(() =>
59 fetch(url, {
60 method,
61 headers: {
67 ).pipe(
68 Effect.tap(Effect.annotateCurrentSpan({ method, url })),
69 Effect.withLogSpan("fetchGlide"),
70 );
71
81 Effect.catchTag(
82 "UnknownException",
83 () => new GlideError({ message: "Could not fetch" }),
84 ),
85 );
102 rows = rows.map(removeUnsupportedColumnTypes);
103 }
104 const results = yield* fetchGlide<PutResult>("PUT", url, {
105 rows,
106 schema: { columns: [] },
124 const url = `${baseUrl}/stashes/${id}/${serial}`;
125 yield* Effect.logDebug(`postStash ${serial}`);
126 yield* fetchGlide("POST", url, rows);
127 return { $stashID: id };
128 }).pipe(
161 const stream = Stream.fromAsyncIterable(
162 // We buffer the rows into larger chunks
163 // because many APIs only fetch small chunks (e.g. 100)
164 // records at a time.
165 bufferAsyncIterable(getRows()),

azureCheetahmain.tsx2 matches

@tmcw•Updated 9 months ago
190 code: newCode,
191 });
192 fetch('/save', { method: "POST", body }).then(() => {
193 document.getElementById('code-input-hidden').value = newCode;
194 document.getElementById('preview-iframe').src += '';
497 app.post("/", mainHandler);
498
499 return passwordAuth(app.fetch, { verifyPassword: verifyToken });
500}

VALLErunmain.tsx2 matches

@tmcw•Updated 9 months ago
190 code: newCode,
191 });
192 fetch('/save', { method: "POST", body }).then(() => {
193 document.getElementById('code-input-hidden').value = newCode;
194 document.getElementById('preview-iframe').src += '';
497 app.post("/", mainHandler);
498
499 return passwordAuth(app.fetch, { verifyPassword: verifyToken });
500}

isMyWebsiteDownmain.tsx2 matches

@jermspeaks•Updated 9 months ago
9 let reason: string;
10 try {
11 const res = await fetch(URL, { redirect: "follow" });
12 if (res.status !== 200) {
13 reason = `(status code: ${res.status})`;
15 }
16 } catch (e) {
17 reason = `couldn't fetch: ${e}`;
18 ok = false;
19 }

proxyFetch2 file matches

@vidar•Updated 2 days ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 2 days ago