lib/httpx/response.rb in httpx-0.6.3 vs lib/httpx/response.rb in httpx-0.6.4

- old
+ new

@@ -50,13 +50,19 @@ def complete? bodyless? || (@request.verb == :connect && @status == 200) end + # :nocov: def inspect - "#<Response:#{object_id} @status=#{@status} @headers=#{@headers}>" + "#<Response:#{object_id} "\ + "HTTP/#{version} " \ + "@status=#{@status} " \ + "@headers=#{@headers} " \ + "@body=#{@body}>" end + # :nocov: def raise_for_status return if @status < 400 raise HTTPError, self @@ -162,9 +168,17 @@ end def ==(other) to_s == other.to_s end + + # :nocov: + def inspect + "#<HTTPX::Response::Body:#{object_id} " \ + "@state=#{@state} " \ + "@length=#{@length}>" + end + # :nocov: private def rewind return if @state == :idle