You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But, I don't see anything in the docs about how to create an endpoint that can send back HTML from a .astro component, this would be amazingly helpful. I went back and watched your demo with The Primeagen hoping it explained how, but I noticed he only handles the simple GET request. How can I handle the other HTTP verbs?
something like this would be awesome...
./src/pages/api/sign-up.ts
import { APIRoute } from "astro";
import SignIn from "../../components/SignIn.astro";
export const POST: APIRoute = async ({ request }) => {
// const data = await request.json();
return new Response(<SignIn error="Invalid username or password" />));
}
The text was updated successfully, but these errors were encountered:
Thanks for the issue @sygint — the link @florian-lefebvre shared is probably the best resource here.
Given this issue tracker is for ideas and bugs in the Astro documentation site itself rather than issues with Astro, I'll close this and recommend continuing discussion at the roadmap link.
Astro is so amazing!!!!!
But, I don't see anything in the docs about how to create an endpoint that can send back HTML from a .astro component, this would be amazingly helpful. I went back and watched your demo with The Primeagen hoping it explained how, but I noticed he only handles the simple GET request. How can I handle the other HTTP verbs?
something like this would be awesome...
./src/pages/api/sign-up.ts
The text was updated successfully, but these errors were encountered: