#BOUNTY 10$ !!! Help me solve this and I will give 10$ gift card

13 messages · Page 1 of 1 (latest)

jolly flame
#

:doubt:

leaden patio
#

You are using a get request with a body. To pass data to get requests you can use headers, path parameters or query parameters.

#

I think having a body on a get is technically possible but depending on the client/server you use it might be removed at some point as it’s against spec

#

Read

#

It’s literally in the message you quoted

#

Either use a method that supports a body or use a get compatible way to pass the data

#

Easiest solution for you right now would be to change it to a post on both client and server but that is unsafe.

#

The correct way would be to just send the auth token in a header, verify that in your api and use that to get the email

topaz matrix
#

do you have the documentation for /api/users/wishlist ? If that is nextjs api route, can you post the code of the api route too?

leaden patio
#

for what?

#

changing axios.get to axios.post?

#

i have no clue what your api route looks like

#

you can get that from the request object passed to the api route