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/?q=fetch&page=589&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 7881 results for "fetch"(2284ms)

nameOfUnicodeREADME.md1 match

@jdan•Updated 10 months ago
4import { blob } from "https://esm.town/v/std/blob?v=12";
5
6fetch("https://unicode.org/Public/UNIDATA/UnicodeData.txt").then(async function(response) {
7 const text = await response.text();
8 const data = {};

htmxGenFormsExamplemain.tsx1 match

@yawnxyz•Updated 10 months ago
114});
115
116export default app.fetch;
117
118export function showClicked() {

uptimemain.tsx2 matches

@wilg•Updated 10 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

aiHonoHtmxAlpineStreamingExamplemain.tsx1 match

@yawnxyz•Updated 10 months ago
129app.get('/', (c) => c.html(htmlContent));
130
131export default app.fetch; // val.town
132

isMyWebsiteDownmain.tsx2 matches

@healeycodes•Updated 10 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

uptimemain.tsx2 matches

@devinmcgloin•Updated 10 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

uptimemain.tsx2 matches

@sumukh•Updated 10 months ago
14 start = performance.now();
15 try {
16 const res = await fetch(url);
17 end = performance.now();
18 status = res.status;
25 } catch (e) {
26 end = performance.now();
27 reason = `couldn't fetch: ${e}`;
28 ok = false;
29 console.log(`Website down (${url}): ${reason} (${end - start}ms)`);

blob_adminmain.tsx2 matches

@charlypoly•Updated 10 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

honoExamplemain.tsx1 match

@qqyule•Updated 10 months ago
8 return c.json(body);
9});
10export default app.fetch;

uploadImagemain.tsx2 matches

@qqyule•Updated 10 months ago
10 image,
11 );
12 const data = await (await fetch(await getUploadURL(), {
13 "body": fd,
14 "method": "POST",
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago