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

HTTParty issue with body containing array of jsons. #26

Open
mpizzagalli opened this issue May 23, 2017 · 0 comments
Open

HTTParty issue with body containing array of jsons. #26

mpizzagalli opened this issue May 23, 2017 · 0 comments

Comments

@mpizzagalli
Copy link

We should be aware that if you want to make a post request with HTTParty with a body like the following:

{ 
  values: [{some_attr: some_value1, another_attr: another_value1},
           {some_attr: some_value2, another_attr: another_value2},
           {some_attr: some_value3, another_attr: another_value3}]
}

HTTParty transforms it in the following:

{
  values: [{some_attr: [some_value1, some_value1, some_value1]}, 
           {another_attr: [another_value1, another_value2, another_value3]}]
}

There is a possible fix here:
https://stackoverflow.com/questions/21856373/sending-array-variables-using-httparty

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

No branches or pull requests

2 participants