8 - 🚀 Natural-sounding voices
9 - 🌍 Support for many languages
10 - 📰 Paste a link to fetch the article (by: [markdown.download](https://markdown.download/))
11 - ✨ Detect the language of pasted / scraped text
12 - ⬇️ Download generated audio files (no rights guaranteed)
1# Framer Fetch: Basic
2
3A basic example of an API endpoint to use with Framer Fetch.
12
13 try {
14 const response = await fetch(url);
15 const data = await response.json();
16 return data;
578
579 // just launch it, don't wait for the result
580 // const taskRunResponse = await fetch(`${URL}/taskrun`, {
581 const taskRunResponse = fetch(`${URL}/taskrun`, {
582 method: 'POST',
583 headers: {
674}
675
676export default app.fetch;
677export { ModelProvider, modelProvider, ai, test };
678
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Example : https://discord.com/developers/docs/interactions/application-commands#slash-commands-example-slash-command
23 const base = new URL("https://discord.com/api/v10/");
24 const commandsUrl = new URL(`applications/${appID}/commands`, base);
25 return fetch(commandsUrl.toString(), {
26 headers: {
27 Authorization: `Bot ${botToken}`,
86 const y = d3.select(this).attr("cy");
87
88 fetch(`/update?x=${x}&y=${y}&i=${d3.select(this).attr("idx")}`, { method: "post" });
89 d3.select(this).attr("stroke", null);
90 }
190 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
191});
192export default app.fetch;
67 app.get("/posts/:post", route(Post, data));
68
69 return app.fetch;
70}
113
114 if (working) {
115 return c.text("Sorry, another embedding is being fetched, wait a moment and try again")
116 }
117
274})
275
276export default app.fetch
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
7The `posts` directory contains markdown files.
8It also includes an `index.json` with an array of posts for the blog.
9These posts are fetched as markdown then processed with graymatter and remark to convert them into metadata and HTML.
10
11The `www` val serves the site using the `src/hono-adapter`.