#POST-PUT-DELETE Requests in NextJS Frontend

1 messages · Page 1 of 1 (latest)

warped stump
frosty parcel
#

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?

warped stump
#

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

Learn how to build a performant, accessible form with Next.js while teaching best practices for HTML & React forms along the way.

frosty parcel
#

But without using nextjs, only using react itself without a react framewotk

#

Making client side requests

warped stump
#

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

frosty parcel
#

hmmmm thanks @warped stump because in the document I only see things about get.