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?q=fetch&page=767&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 9460 results for "fetch"(1246ms)

ssr_react_minimain.tsx1 match

@flxa•Updated 1 year ago
22 const onData = onSubmit ? onSubmit(e) : () => 1;
23 const formData = new FormData(e.target as any);
24 const resp = await fetch("/", {
25 method: props.action ?? "POST",
26 body: formData,

discordmain.tsx1 match

@Curt•Updated 1 year ago
1const pingDiscord = async (url: string, username: string, content: string): Promise<Response> =>
2 await fetch(url, {
3 method: "POST",
4 headers: {

alchemyClientREADME.md1 match

@jamiedubs•Updated 1 year ago
1simple wrapper for [Alchemy's blockchain APIs](https://docs.alchemy.com/reference/alchemy-gettokenbalances), for fetching blockchain data. Ethereum, Solana, etc
2
3uses my personal ALCHEMY_API_KEY, I forget if you can use it too or not! get your own if it doesn't work

ethereumTokenBalancesREADME.md1 match

@jamiedubs•Updated 1 year ago
1fetch token balances from an Ethereum wallet. uses Alchemy. don't abuse my API key or I'll turn this off
2
3Use it like: https://jamiedubs-ethereumtokenbalances.web.val.run/?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

telegrammain.tsx1 match

@stevekrouse•Updated 1 year ago
25
26async function telegramRequest(path, body, authorization?: string) {
27 const response = await fetch("https://stevekrouse-telegramValTownAPI.web.val.run/" + path, {
28 method: "POST",
29 body: JSON.stringify(body),

telegramSendMessagemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendMessage = async (botToken: string, options: TelegramSendMessageOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendMessage`,
6 {

telegramSendPhotomain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendPhoto = async (botToken: string, options: TelegramSendPhotoOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendPhoto`,
6 {

passkeys_demomain.tsx1 match

@hlobil•Updated 1 year ago
298 return c.json("success");
299});
300export default app.fetch;

letterboxdmain.tsx3 matches

@javier•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=5";
2
3export const letterboxd = async (username: string) => {
5 const URL = `https://letterboxd.com/${username}/films/diary/`;
6 const getTotalPages = async () => {
7 const html = await fetchText(URL);
8 const $ = cheerio.load(html);
9 return +$(".paginate-page a").last().text();
10 };
11 const getFilmsForPage = async (page) => {
12 const html = await fetchText(URL + "page/" + page);
13 const $ = cheerio.load(html);
14 return $(".diary-entry-edit a").map((i, metadata) => {

isMyWebsiteDownmain.tsx2 matches

@moonbe77•Updated 1 year 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 }

agentplex-deal-flow-email-fetch1 file match

@anandvc•Updated 1 hour ago

proxyFetch2 file matches

@vidar•Updated 2 days ago