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=758&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 8634 results for "fetch"(1314ms)

honoJSXmain.tsx1 match

@stevekrouse•Updated 1 year ago
29 return c.html(<Top messages={messages} />);
30});
31export let honoJSX = app.fetch;

honoExamplemain.tsx1 match

@stevekrouse•Updated 1 year ago
4app.get('/', c => c.text("Hello Hono!"))
5
6export const honoExample = app.fetch

zaobaomain.tsx1 match

@baj•Updated 1 year ago
2
3export async function zaobao() {
4 const res = await fetch(
5 `https://chrome.browserless.io/content?token=${process.env.browserlessKey}`,
6 {

browserlessScrapeExamplemain.tsx2 matches

@baj•Updated 1 year ago
1// import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2import process from "node:process";
3
4export const browserlessScrapeExample = (async () => {
5 try {
6 const res = await fetch(
7 `https://chrome.browserless.io/scrape?token=${process.env.browserlessKey}`,
8 {

handlermain.tsx2 matches

@maxjoygit•Updated 1 year ago
9app.post("/test", (c) => c.text("Hello Lagon test ppost!"));
10
11export const handler = app.fetch;
12
13// export const honoExample = async (req: Request) => {
16// app.get("/", (c) => c.text("Hono?"));
17// app.get("/yeah", (c) => c.text("Routing!"));
18// return app.fetch(req);
19// };

getDetailsPlaystoreREADME.md1 match

@ayrtonlacerda•Updated 1 year ago
1Function that fetches app data from the playstore through bundleId
2
3Migrated from folder: Edoo/getDetailsPlaystore

feedmain.tsx2 matches

@darcy•Updated 1 year ago
1import { following } from "https://esm.town/v/darcy/following";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export function feed() {
5 let _feed = following.map(async (name) => {
6 let req = await fetch(`https://api.val.town/v1/run/${name}.posts`);
7 let res = (req.status === 200) ? req.json() : {};
8 return res;

fetchTextmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { normalizeURL } from "https://esm.town/v/stevekrouse/normalizeURL";
2
3export const fetchText = async (url: string, options?: any) => {
4 let f = await fetch(normalizeURL(url), {
5 redirect: "follow",
6 ...(options || {}),

glifJsonmain.tsx2 matches

@jamiedubs•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const glifJson = async (req: Reqeust) => {
6 const url = `https://glif.app/api/glifs?id=${id}`;
7 try {
8 const response = await fetch(url);
9 if (!response.ok) {
10 throw new Error(`HTTP error! status: ${response.status}`);

glifsmain.tsx2 matches

@jamiedubs•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const glifs = async (id: string) => {
4 const url = `https://glif.app/api/glifs?featured=1`;
5 try {
6 const response = await fetch(url);
7 if (!response.ok) {
8 throw new Error(`HTTP error! status: ${response.status}`);

fetchPaginatedData2 file matches

@nbbaier•Updated 3 weeks ago

FetchBasic1 file match

@fredmoon•Updated 3 weeks ago