How to type a prop which is an Astro Component with Typescript?
I’m passing an Astro component through prop. I’d like to know how should I type it with Typescript. Keep in mind that the component I’m passing is different in each instance.
Content-Type was not one of “multipart/form-data” or “application/x-www-form-urlencoded”
I am attempting to build a static site with Astro, but I want to add a component that allows a user to sign up for a newsletter via an HTML form. Following Astro’s guides, I am using an API endpoint to accept the form data and process the logic. However, when submitting the form, I get an error, Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded"
when calling await request.formData();
. As far as I can see by looking at the headers in the request though, it is encoded as multipart/form-data: