Returns integer 80
, the default port to use for HTTP
requests:
Net::HTTP.http_default_port # => 80
Returns integer 443
, the default port to use for HTTPS requests:
Net::HTTP.https_default_port # => 443
Sets the encoding to be used for the response body; returns the encoding.
The given value
may be:
An Encoding
object.
The name of an encoding.
An alias for an encoding name.
See Encoding
.
Examples:
http = Net::HTTP.new(hostname) http.response_body_encoding = Encoding::US_ASCII # => #<Encoding:US-ASCII> http.response_body_encoding = 'US-ASCII' # => "US-ASCII" http.response_body_encoding = 'ASCII' # => "ASCII"