Posts by Max Castro • 11 points
3 posts
-
0
votes1
answer80
viewsA: React Nextjs - Path of the Undefined parameter after giving Refrech ( F5 ) on the page
You are making the requisition with the id of a Promise within the useEffect. So when you update your page props.id is undefined by default. Try saving your object to state of the application. To…
-
1
votes1
answer419
viewsA: Bad Request 400 - Using Fetch API
I was able to solve by specifying the file type of the resource in my header. The requisition went like this: function createTool(token, tool) { return fetch(`${url}/tools`, { method: 'POST',…
-
0
votes1
answer419
viewsQ: Bad Request 400 - Using Fetch API
I’m having trouble accessing my api using POST method. This is my requisition: function createTool(token, obj) { return fetch(`${url}/tools`, { method: 'POST', headers: { Authorization: token, },…