1import { email } from "https://esm.town/v/std/email?v=11";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export default async () => {
8 let reason: string;
9 try {
10 const res = await fetch(URL);
11 if (res.status !== 200) {
12 reason = `(status code: ${res.status})`;
14 }
15 } catch (e) {
16 reason = `couldn't fetch: ${e}`;
17 ok = false;
18 }
10
11 constructor() {}
12 async fetch(req: Request): Promise<Response> {
13 const gameInfo = parseURL(req.url);
14 if (gameInfo === undefined) {
211
212const sc = new StaticChess();
213export default sc.fetch.bind(sc);
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
2import { html, load } from "npm:cheerio";
3
4const htmlStr = await fetchText(
5 "https://archive.is/pPFRB",
6);
10
11 constructor() {}
12 async fetch(req: Request): Promise<Response> {
13 const gameInfo = parseURL(req.url);
14 if (gameInfo === undefined) {
211
212const sc = new StaticChess();
213export default sc.fetch.bind(sc);
24 const authHeader = req.headers.get("Proxy-Authorization") || req.headers.get("Authorization");
25 const token = authHeader ? parseBearerString(authHeader) : undefined;
26 const meRes = await fetch(`${API_URL}/v1/me`, { headers: { Authorization: `Bearer ${token}` } });
27 if (!meRes.ok) {
28 return new Response("Unauthorized", { status: 401 });
46 headers.set("OpenAI-Organization", Deno.env.get("OPENAI_API_ORG"));
47
48 const openAIRes = await fetch(url, {
49 method: req.method,
50 headers,
16
17import { wasmHandler } from "https://esm.town/v/maxm/tinygoHttp";
18const resp = await fetch("https://maxm-wasmblobhost.web.val.run/jpxqvyy5tphiwehzklmioklpkpz4gpzs.wasm");
19const handler = await wasmHandler(new Uint8Array(await resp.arrayBuffer()));
20export default async function(req: Request): Promise<Response> {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Send a pushover message.
14 });
15
16 const response = await fetch("https://api.pushover.net/1/messages.json", {
17 method: "POST",
18 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function ShopifyProductSearch(brokerId, first = 20) {
226 try {
227 // Making the POST request
228 const response = await fetch(url, {
229 method: "POST",
230 headers: headers,
238 const products = results.data.shopProductSearch.nodes;
239
240 console.log(`Fetched ${products.length} products`);
241
242 const productDetails = products.map((product) => ({
12 * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
13 * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
14 * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
15 * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
16 * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
2import { api } from "https://esm.town/v/pomdtr/api";
3import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo";
4import { fetchText } from "https://esm.town/v/stevekrouse/fetchText?v=6";
5import { Hono } from "npm:hono";
6import { jsxRenderer } from "npm:hono/jsx-renderer";
10
11async function bookmarkletUrl(author: string, name: string) {
12 const resp = await fetch(`https://esm.town/v/${author}/${name}`);
13 const { code } = await minify(await resp.text());
14 return `javascript:(() => {${encodeURIComponent(code)}})()`;
96});
97
98export default app.fetch;