#POST-PUT-DELETE Requests in NextJS Frontend
1 messages · Page 1 of 1 (latest)
Yes! You can make the request in the component. This blog post should help: https://nextjs.org/blog/forms
I've read this article but in the next section he only show the request do the /api/register. This endpoint doesn't exists, how can I send my request to the endpoint https://xpo/test for example?
The "React Forms" section (https://nextjs.org/blog/forms#react-forms) has an example where a POST request is made to a Zapier api endpoint. You should be able to do something similar to that
But without using nextjs, only using react itself without a react framewotk
Making client side requests
NextJS is a React framework, so it supports everything that React does. NextJS doesn't have its own way of making client side requests, so you can use something like fetch or axios
hmmmm thanks @warped stump because in the document I only see things about get.