lib/httpx/response.rb in httpx-1.2.0 vs lib/httpx/response.rb in httpx-1.2.1

- old
+ new

@@ -68,12 +68,13 @@ # writes +data+ chunk into the response body. def <<(data) @body.write(data) end - # returns the response mime type, as per what's declared in the content-type header. + # returns the HTTPX::ContentType for the response, as per what's declared in the content-type header. # - # response.content_type #=> "text/plain" + # response.content_type #=> #<HTTPX::ContentType:xxx @header_value="text/plain"> + # response.content_type.mime_type #=> "text/plain" def content_type @content_type ||= ContentType.new(@headers["content-type"]) end # returns whether the response has been fully fetched.