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%22Optional%20title%22?q=fetch&page=1081&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 12930 results for "fetch"(2232ms)

isMyWebsiteDownmain.tsx2 matches

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

isMyWebsiteDownmain.tsx2 matches

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

violetBuzzardmain.tsx2 matches

@pomdtr•Updated 11 months ago
122};
123
124export type FetchAction = {
125 type: "run";
126 command: string;
139};
140
141export type Command = OpenAction | CopyAction | FetchAction | PushAction;
142export type View = List | Detail | Form;
143

counterTownmain.tsx2 matches

@stevekrouse•Updated 11 months ago
1/** @jsxImportSource npm:hono@3/jsx */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
4import { Hono } from "npm:hono";
5
50
51const app = new Hono();
52export default reloadOnSaveFetchMiddleware(counterTownMiddleware(app.fetch));
53app.get("/", async (c) => {
54 return c.html(

placemarkGlobeMonitormain.tsx5 matches

@seanehalpin•Updated 11 months ago
1import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
2
3async function fetchPluginData(pluginId) {
4 const response = await fetch(`https://www.figma.com/api/plugins/${pluginId}/versions`);
5 if (!response.ok) {
6 throw new Error(`Failed to fetch data for plugin ${pluginId}: ${response.statusText}`);
7 }
8 const data = await response.json();
12export default async function(interval: Interval) {
13 try {
14 const microPlugin = await fetchPluginData("1349001943025285729");
15 const wireBoxPlugin = await fetchPluginData("764471577604277919");
16
17 await sqlite.execute(`

honoDatabricksU2MAuthmain.tsx1 match

@tfayyaz•Updated 11 months ago
38});
39
40export default app.fetch;

purpleQuokkamain.tsx1 match

@iamseeley•Updated 11 months ago
5const app = createApp();
6
7export default passwordAuth(app.fetch, {
8 verifyPassword: verifyToken,
9});

ejmmain.tsx1 match

@pomdtr•Updated 11 months ago
11
12 const srcURL = new URL(target);
13 const resp = await fetch(srcURL);
14 if (!resp.ok) {
15 return new Response("not found", { status: 404 });

getUltimesNoticiesmain.tsx3 matches

@icar•Updated 11 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export async function getUltimesNoticies() {
5 const fetchResponse = await fetch(
6 "https://www.ccma.cat/324/ultimes-noticies/",
7 );
8 const responseText = await fetchResponse.text();
9 const now = new Date();
10 await email({

sqliteExplorerAppmain.tsx4 matches

@hlobil•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

fetch-socials4 file matches

@welson•Updated 2 days ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 2 days ago