Skip to content
New issue

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

Requests with content-type application/json do not parse params correctly #1337

Open
crimson-knight opened this issue Aug 7, 2023 · 0 comments

Comments

@crimson-knight
Copy link
Member

When sending a request with the header content-type: application/json with a body that has any kind of valid nested objects, the body is not parsed entirely.

For example:

a POST with content-type application/json in the header and body of:

{
  "ids": [1,2,3]
}

Would be parsed by Amber as:

params["ids"]  # "[1,2,3]" <- with a value as a type of String
{
 "example_object": {
    "another_object": "test"
  }
}

Would be parsed by Amber as:

params["example_object"] # "{ \"another_object\": \"test\" }" 

The expected result is that for this type of request that the entire request body be accessible as a JSON object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant