Maximum number of times to retry an idempotent request in case of Net::ReadTimeout
, IOError
, EOFError
, Errno::ECONNRESET
, Errno::ECONNABORTED
, Errno::EPIPE, OpenSSL::SSL::SSLError
, Timeout::Error
. Should be a non-negative integer number. Zero means no retries. The default value is 1.
Setter for the read_timeout
attribute.
The address of the proxy server, if one is configured.
The port of the proxy server, if one is configured.
utils
Gets the entity body returned by the remote HTTP server.
If a block is given, the body is passed to the block, and the body is provided in fragments, as it is read in from the socket.
Calling this method a second or subsequent time for the same HTTPResponse
object will return the value already read.
http.request_get('/index.html') {|res| puts res.read_body } http.request_get('/index.html') {|res| p res.read_body.object_id # 538149362 p res.read_body.object_id # 538149362 } # using iterator http.request_get('/index.html') {|res| res.read_body do |segment| print segment end }
The default port for IMAP
connections, port 143
Similar to sort()
, but returns an array of unique identifiers.
Similar to thread()
, but returns unique identifiers instead of message sequence numbers.
Formats time
as an IMAP-style date.
Formats time
as an IMAP-style date-time.
returns the port for POP3
Set
the read timeout.
The default SMTP
port number, 25.