Method: Net::HTTPGenericRequest#decode_content

Defined in:
lib/net/http/generic_request.rb

#decode_contentObject (readonly)

Returns false if the request’s header 'Accept-Encoding' has been set manually or deleted (indicating that the user intends to handle encoding in the response), true otherwise:

req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET>
req['Accept-Encoding']        # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
req.decode_content            # => true
req['Accept-Encoding'] = 'foo'
req.decode_content            # => false
req.delete('Accept-Encoding')
req.decode_content            # => false


95
96
97
# File 'lib/net/http/generic_request.rb', line 95

def decode_content
  @decode_content
end