Skip to content

Commit c4c416a

Browse files
miavisabenoitc
authored andcommitted
Support empty body as list for POST and PUT operations (#553)
1 parent 42875a9 commit c4c416a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hackney_request.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ perform(Client0, {Method0, Path, Headers0, Body0}) ->
7373
Size, Boundary, Client0);
7474
<<>> when Method =:= <<"POST">> orelse Method =:= <<"PUT">> ->
7575
handle_body(Headers2, ReqType0, Body0, Client0);
76+
[] when Method =:= <<"POST">> orelse Method =:= <<"PUT">> ->
77+
handle_body(Headers2, ReqType0, Body0, Client0);
7678
<<>> ->
7779
{Headers2, ReqType0, Body0, Client0};
7880
[] ->

0 commit comments

Comments
 (0)