diff --git a/history.md b/history.md index 89ec135..994361a 100644 --- a/history.md +++ b/history.md @@ -8,6 +8,7 @@ - multipart parameters names should not be escaped - remove the cookie escaping introduced by migrating to CGI cookie parsing in 1.5.1 - add a streamed payload type (patch provided by Caleb Land) +- Exception#http_body works even when no response # 1.5.1 diff --git a/lib/restclient/exceptions.rb b/lib/restclient/exceptions.rb index 8452021..cbc901c 100644 --- a/lib/restclient/exceptions.rb +++ b/lib/restclient/exceptions.rb @@ -95,7 +95,7 @@ module RestClient end def http_body - @response.body + @response.body if @response end def inspect