8586try {
87const response = await fetch("/", {
88method: "POST",
89body: JSON.stringify({ prompt, currentCode: code, errorMessage: shaderErrorMessage }),
8586try {
87const response = await fetch("/", {
88method: "POST",
89body: JSON.stringify({ prompt, currentCode: code, errorMessage: shaderErrorMessage }),
bsky_rss_pollmain.tsx2 matches
1import { rss_to_bsky } from "https://esm.town/v/jordan/rss_to_bsky";
2import { blob } from "https://esm.town/v/std/blob";
3import { fetch } from "https://esm.town/v/std/fetch";
45export async function bsky_rss_poll() {
6const { parseFeed } = await import("https://deno.land/x/rss/mod.ts");
7const res = await fetch("https://v8.dev/blog.atom")
8.then(res => res.text())
9.then(res => parseFeed(res));
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.
reqEvaltownmain.tsx1 match
32const url = new URL("." + pathname, "http://localhost:" + port);
33url.search = search;
34const resp = await fetch(url, {
35method: req.method,
36headers: req.headers,
valtowntownmain.tsx1 match
174});
175176export default app.fetch.bind(app);
177178const css = `
verbalScarletAntelopemain.tsx12 matches
60}, [state.loading, state.hasMore]);
6162const fetchStories = async () => {
63try {
64const response = await fetch("/api/stories");
65if (!response.ok) throw new Error("Failed to fetch dates");
66const data = await response.json();
67setStories(data);
69}
70catch (err) {
71console.error("Error fetching stories:", err);
72}
73};
7475const fetchComments = async (query: string, story: string, page: number) => {
76try {
77dispatch({ type: "loading", value: true });
78const response = await fetch(`/api/comments?query=${encodeURIComponent(query)}&story=${story}&page=${page}`);
79if (!response.ok) throw new Error("Failed to fetch comments");
80const data = await response.json();
81setComments(prevComments => page === 1 ? data.hits : [...prevComments, ...data.hits]);
84dispatch({ type: "loading", value: false });
85} catch (err) {
86console.error("Error fetching comments:", err);
87dispatch({ type: "loading", value: false });
88}
99dispatch({ type: "hasMore", value: true });
100dispatch({ type: "query", value: newQuery });
101fetchComments(fullQuery, state.story, 1);
102};
103104useEffect(() => {
105fetchStories();
106107const handleScroll = () => {
122: "";
123const fullQuery = `${filtersQuery} ${state.query}`;
124fetchComments(fullQuery, state.story, state.page);
125}
126}
408tags: `comment, story_${story}`,
409page: 0,
410hitsPerPage: 100, // Fetch a moderate number of comments
411});
412
jubilantMagentaMitemain.tsx3 matches
3031modifiedRequest.headers.set("Referer", `${EMBY_SERVER}/web/index.html`);
32return fetch(modifiedRequest);
33}
34}
47modifiedRequest.headers.set("Connection", request.headers.get("Connection") || "close");
4849return fetch(modifiedRequest);
50}
5152addEventListener("fetch", event => {
53event.respondWith(handleRequest(event.request));
54});
worthyCyanRoundwormmain.tsx2 matches
246e.preventDefault();
247const finalAmount = showCustomAmount ? parseFloat(customAmount) : amount;
248const response = await fetch("/create-checkout-session", {
249method: "POST",
250headers: { "Content-Type": "application/json" },
504}
505506// Fetch all tips for the root endpoint
507const allTips = await sqlite.execute(
508`SELECT name, amount, comment, timestamp FROM ${KEY}_payments_${SCHEMA_VERSION} ORDER BY amount DESC`,
forbearingAmethystToadmain.tsx2 matches
246e.preventDefault();
247const finalAmount = showCustomAmount ? parseFloat(customAmount) : amount;
248const response = await fetch("/create-checkout-session", {
249method: "POST",
250headers: { "Content-Type": "application/json" },
504}
505506// Fetch all tips for the root endpoint
507const allTips = await sqlite.execute(
508`SELECT name, amount, comment, timestamp FROM ${KEY}_payments_${SCHEMA_VERSION} ORDER BY amount DESC`,