Next.js Discord

Discord Forum

Delete method

Answered
Persian posted this in #help-forum
Open in Discord
PersianOP
Hi, I'm getting an error when i'm tryna log the request payload in the DELETE method but that's what im getting
Answered by riský
you can't have body (aka json) in DELETE request (according to the spec and most folow it)
View full answer

15 Replies

PersianOP
you can't have body (aka json) in DELETE request (according to the spec and most folow it)
Answer
So i should add it in the url?
the common workarounds are in url or using post
PersianOP
Im using post to add the data so ima do the url thing
i think that in url makes more sense anyway (and can use dynamic routes)
@riský i think that in url makes more sense anyway (and can use dynamic routes)
PersianOP
How can i get the request params
PersianOP
Already found it but thanks alot
Giant panda
@Persian I am warning you now for the final time. You have created the third thread about this problem within a day. If you don't start following our rules and don't stop spamming I will take action for good.
Giant panda
Then you should look more thoroughly as all threads you are involved in are in a list on the left
@Giant panda Then you should look more thoroughly as all threads you are involved in are in a list on the left
PersianOP
Idk maybe i unfollowed it by wrong, idk how to use it trust me
and im very sorry about it