Skip to content

Commit

Permalink
Do not encode an empty body.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Becker committed May 16, 2017
1 parent 1c9b411 commit d721b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/httparty/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def handle_response(body, &block)
perform(&block)
else
body ||= last_response.body
body = encode_body(body)
body = body.nil? ? body : encode_body(body)
Response.new(self, last_response, lambda { parse_response(body) }, body: body)
end
end
Expand Down

0 comments on commit d721b76

Please sign in to comment.