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=669&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 9134 results for "fetch"(3207ms)

blob_adminmain.tsx2 matches

@bpugh•Updated 9 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

blobmain.tsx4 matches

@std•Updated 9 months ago
82async function list(prefix?: string): Promise<{ key: string; size: number; lastModified: string }[]> {
83 let querystring = prefix ? `?prefix=${encodeURIComponent(prefix)}` : "";
84 const res = await fetch(`${API_URL}/v1/blob${querystring}`, {
85 headers: {
86 Authorization: `Bearer ${Deno.env.get("valtown")}`,
95
96async function delete_(key: string) {
97 const res = await fetch(`${API_URL}/v1/blob/${encodeURIComponent(key)}`, {
98 method: "DELETE",
99 headers: {
108
109async function get(key: string) {
110 const res = await fetch(`${API_URL}/v1/blob/${encodeURIComponent(key)}`, {
111 headers: {
112 Authorization: `Bearer ${Deno.env.get("valtown")}`,
124
125async function set(key: string, value: BodyInit) {
126 const res = await fetch(`${API_URL}/v1/blob/${encodeURIComponent(key)}`, {
127 method: "POST",
128 headers: {

blob_adminmain.tsx2 matches

@sedson•Updated 9 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));

ogImagemain.tsx2 matches

@moe•Updated 9 months ago
32 const fontPromises = fontsConfig.map(async (font) => {
33 const fontUrl = "https://cdn.jsdelivr.net/npm/@tamagui/font-inter@1.108.3/otf/" + font.fontFile
34 const fontArrayBuf = await fetch(fontUrl).then((res) => res.arrayBuffer())
35 return { name: font.name, data: fontArrayBuf, weight: font.weight }
36 })
43 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
44 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`
45 return fetch(api).then((r) => r.text())
46}

slogan_historymain.tsx1 match

@timqian•Updated 9 months ago
196 ));
197
198export default app.fetch;

spacexREADME.md1 match

@ngmi•Updated 9 months ago
2
3todo:
4- fetch and persist data on regular basis
5- display data from cache
6- calendar endpoint

spacexmain.tsx1 match

@ngmi•Updated 9 months ago
6
7const app = new Hono()
8export default app.fetch
9
10const baseUrl = "https://moe-spacex.web.val.run"

bookTheSperryChaletmain.tsx1 match

@mattrw2•Updated 9 months ago
5
6export default async function(interval: Interval) {
7 const response = await fetch("https://www.sperrychalet.com/vacancy_s.html");
8 const body = await response.text();
9 const $ = cheerio.load(body);

smallwebmain.tsx1 match

@pinjasaur•Updated 9 months ago
1import { DOMParser, Element } from "jsr:@b-fuze/deno-dom";
2
3const getText = async url => (await fetch(url)).text();
4
5export default async function(req: Request): Promise<Response> {

fetchIpfsPostsmain.tsx5 matches

@stevedylandev•Updated 9 months ago
2let endDate = Math.floor(currentDate.getTime() / 1000);
3let startDate = Math.floor(currentDate.setDate(currentDate.getDate() - 7) / 1000);
4export async function fetchIPFSPosts() {
5 try {
6 const soRes = await fetch(
7 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=upload&site=stackoverflow`,
8 {
23 });
24
25 const seRes = await fetch(
26 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=s3&site=stackoverflow`,
27 {
42 });
43
44 const fileApiRes = await fetch(
45 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=fileapi&site=stackoverflow`,
46 )
84 return emailText;
85 } catch (error) {
86 console.error("Error fetching data:", error);
87 return null;
88 }

proxyFetch2 file matches

@vidar•Updated 16 hours ago

TAC_FetchBasic2 file matches

@A7_OMC•Updated 1 day ago