class HTTP::Client::Response
inherits Reference
¶
Class methods¶
.from_io?(io, ignore_body = false, decompress = true)
¶
(io, ignore_body = false, decompress = true)
Parses an HTTP::Client::Response
from the given IO
.
Might return nil
if there's no data in the IO
,
which probably means that the connection was closed.
.from_io?(io, ignore_body = false, decompress = true
¶
(io, ignore_body = false, decompress = true
Parses an HTTP::Client::Response
from the given IO
and yields
it to the block. Might yield nil
if there's no data in the IO
,
which probably means that the connection was closed.
.new(status : HTTP::Status, body : String? = nil, headers : Headers = Headers.new, status_message = nil, version = "HTTP/1.1", body_io = nil)
¶
(status : HTTP::Status, body : String? = nil, headers : Headers = Headers.new, status_message = nil, version = "HTTP/1.1", body_io = nil)
.new(status_code : Int32, body : String? = nil, headers : Headers = Headers.new, status_message = nil, version = "HTTP/1.1", body_io = nil)
¶
(status_code : Int32, body : String? = nil, headers : Headers = Headers.new, status_message = nil, version = "HTTP/1.1", body_io = nil)
Methods¶
#cookies
¶
Returns a convenience wrapper around querying and setting cookie related
headers, see HTTP::Cookies
.