Request information is lost in POST from client component #10117
-
Hi, I am passing the following information to an action in Remix. {"url":"www.microsoft.com"} The code is the following:
I confimed that {"url":"www.microsoft.com"} is being passed to the server.
requestAsString has the following value in it:{}, an empty json object. Did this happened to anyone? What I am doing wrong? PS: This code was working fine today and suddently stopped working after I did a code refactoring in the server side part (node.js), not in the client side code or the action code. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You need to add |
Beta Was this translation helpful? Give feedback.
You need to add
await
beforerequest.json()
, otherwise you're stringifying a Promise