We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.4.3
test
import { json } from '@remix-run/node' export const loader = async ({ request }) => { const body = await request.text() console.log(body) return json({ success: true }, 200) }
curl -X GET -d '{ "content":"something" }' http://localhost:3000/test
The content of the request { "content":"something" } should be printed in the console (server side).
{ "content":"something" }
An empty string is printed in the console (server side). Furthermore, the body property of the request object within the loader is null.
body
request
null
The text was updated successfully, but these errors were encountered:
This is expected behavior as GET/HEAD requests shouldn't have a body according to the spec
GET
HEAD
This was changed in #3207
Sorry, something went wrong.
No branches or pull requests
What version of Remix are you using?
1.4.3
Steps to Reproduce
test
route that exports only a loadercurl -X GET -d '{ "content":"something" }' http://localhost:3000/test
Expected Behavior
The content of the request
{ "content":"something" }
should be printed in the console (server side).Actual Behavior
An empty string is printed in the console (server side). Furthermore, the
body
property of therequest
object within the loader isnull
.The text was updated successfully, but these errors were encountered: