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;
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 }
132});
133
134export default app.fetch;
3const USERNAME = "yieldray"; // <--- Replace with your Github username
4
5const gistList: Array<Gist> = await fetch(`https://api.github.com/users/${USERNAME}/gists`).then((res) => res.json());
6
7app.get("/", (req) => {
42 const f = gist.files[file];
43 if (!f) return new Response("404 File Not Found", { status: 404 });
44 const res = await fetch(f.raw_url);
45 const headers = new Headers(res.headers);
46 // delete unwanted header
61});
62
63const handler = app.fetch
64export default handler
65
29 e.preventDefault();
30 setLoading(true);
31 const cron = await fetch("/compile", {
32 method: "POST",
33 body: new FormData(e.target as HTMLFormElement),
5
6const app = new Hono();
7export default app.fetch;
8app.get("/", (c) =>
9 c.html(
89 button.disabled = true;
90 button.innerText = "Loading..";
91 const cron = await fetch("/compile", { method: "POST", body: new FormData(form) }).then((r) => r.text());
92 button.disabled = false;
93 button.innerText = "Compile";
189 const formData = new FormData();
190 formData.append("audio", blob, "recording.wav");
191 const response = await fetch("/transcribe", { method: "POST", body: formData });
192 if (response.ok) {
193 const result = await response.text();
229 const language2Value = document.getElementById("language2").value;
230
231 const response = await fetch("/translate", {
232 method: "POST",
233 headers: { "Content-Type": "application/json" },
271
272 if (text && voice) {
273 const response = await fetch('/generate-speech', {
274 method: 'POST',
275 headers: { 'Content-Type': 'application/json' },
401
402
403export default app.fetch;