benoitc / hackney

simple HTTP client in Erlang
Other
1.34k stars 427 forks source link

Support empty body as list for POST and PUT operations #553

Closed miavisa closed 5 years ago

miavisa commented 5 years ago

@benoitc please can you reviews this? Currently I am using swagger-codegen to generate an erlang-client, it uses as dependency hackney.

The client handle the empty bodies as an empty list []. From my point of view use a empty list as an empty body is correct, and hackney should support this for POST and PUT operations like the case of empty binary <<>>.

benoitc commented 5 years ago

@miavisa just merged it. That case was missing indeed. Thanks!