Hello! I need some help with forms in astro I'm starting with the framework and I'm a little confused about the forms and sending info to an external API, I've been following the steps in the documentation but I'm getting console errors, can please some one guide me? I'm not using an adapter because I don't need the backend inside astro code 😦
#posting data to an external API from a FORM
9 messages · Page 1 of 1 (latest)
What console errors are you getting?
Need to look at the documentation for that API and see whats its expecting
Is this happening in production or development?
Hello @vagrant coyote, the HTTP error 415 indicates "Unsupported Media Type." It occurs when the server cannot process the media type provided in the request, such as an unsupported or missing Content-Type header. Did you try setting the headers to application/x-www-form-urlencoded ?
Seeing that your api’s X-Powered-by header is ASP.net, maybe that’s a problem with the deployed server, and that the endpoint in your Astro project has not yet been deployed?