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/$%7Burl%7D?q=fetch&page=1073&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 13101 results for "fetch"(1971ms)

isMyWebsiteDownmain.tsx2 matches

@jermspeaks•Updated 10 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 }

crypto_prices_infomain.tsx2 matches

@ghsaboias•Updated 10 months ago
4
5const getCryptoPrices = async () => {
6 const response = await fetch(
7 "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin,ethereum,dogecoin,solana,binancecoin,ripple,pepe",
8 {
52 const telegramSendUrl =
53 `https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage?chat_id=${TELEGRAM_CHAT_ID}&parse_mode=HTML&disable_notification=true&text=${text}`;
54 await fetch(telegramSendUrl);
55};
56

smallboatsapimain.tsx2 matches

@joseph_c100•Updated 10 months ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
2import { load } from "npm:cheerio";
3
4const html = await fetchText(
5 "https://www.gov.uk/government/publications/migrants-detected-crossing-the-english-channel-in-small-boats/migrants-detected-crossing-the-english-channel-in-small-boats-last-7-days",
6);

sqliteExplorerAppmain.tsx4 matches

@nickgolden•Updated 10 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 })));

FetchREADME.md2 matches

@hunty•Updated 10 months ago
1# Fetch Template
2Example template to quickly get started with a backend for Fetch in Framer.

streamwishmain.tsx2 matches

@tempguy•Updated 10 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3function unpack(p, a, c, k) {
13}
14export async function streamwish(ctx) {
15 const _embed = await fetch(ctx.url);
16 const embed = await _embed.text();
17 const pr = /p}\('(.*?)',(\d+),(\d+),'(.*?)'\.split/gm;

amberPigmain.tsx6 matches

@tempguy•Updated 10 months ago
1import { fetch as proxiedFetch } from "https://esm.town/v/std/fetch";
2import { customAlphabet } from "npm:nanoid";
3const nanoid = customAlphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 10);
7 let url = ctx.url;
8 if (ctx.url.includes("primewire")) {
9 const request = await fetch(ctx.url);
10 }
11 const id = url.split("/d/")[1] || url.split("/e/")[1];
12
13 const doodDataReq = await fetch(
14 `https://structural-sidonia-supergalaxy-4284f8da.koyeb.app/hdiuhmalkmc9d0ck7UCFVGBJHN?destination=`
15 + encodeURIComponent(`${baseUrl}/e/${id}`),
24 const thumbnailTrack = doodData.match(/thumbnails:\s\{\s*vtt:\s'([^']*)'/);
25 console.log(path);
26 const doodPageReq = await fetch(
27 `https://structural-sidonia-supergalaxy-4284f8da.koyeb.app/hdiuhmalkmc9d0ck7UCFVGBJHN?destination=`
28 + encodeURIComponent(`${baseUrl}/pass_md5${path}`),
94 // if (Number(_) > 100000) throw new Error("limit reached");
95 // await blob.set("streamtapeLimit", `${Number(_) + 1}`);
96 const _embed = await proxiedFetch(
97 `https://proxy-worker.thunderspeed.workers.dev/proxy?destination=${encodeURIComponent(ctx.url)}`,
98 );
129
130export async function streamium(ctx) {
131 const _embed = await fetch(ctx.url);
132 // https://pump.watchfree.ax/start-play?imdbid=tt11389872&name=apple&season=&episode=
133 const embed = await _embed.text();

playMeASongmain.tsx1 match

@dthyresson•Updated 10 months ago
246});
247
248export default app.fetch;

getSpotifyTrackUrlmain.tsx1 match

@dthyresson•Updated 10 months ago
69
70 // Search for the track
71 const response = await fetch(`https://api.spotify.com/v1/search?q=${query}&type=track`, {
72 headers: {
73 "Authorization": `Bearer ${accessToken.access_token}`,

tracksAPImain.tsx1 match

@dthyresson•Updated 10 months ago
89});
90
91export default yoga.fetch;

fetch-socials4 file matches

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

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 3 days ago