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=720&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 8989 results for "fetch"(1884ms)

val_town_client_exampleREADME.md1 match

@pomdtr•Updated 1 year ago
1# Typed Client for the Val Town API
2
3Automatically generated using [open-api-typescript](https://www.npmjs.com/package/openapi-typescript) and [openapi-fetch](https://www.npmjs.com/package/openapi-fetch).

isMyWebsiteDownmain.tsx2 matches

@harold•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 }

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;

hn-fetch1 file match

@matija•Updated 1 hour ago

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago