HTTP::Client::Response

class HTTP::Client::Response

Defined in:

http/client/response.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.from_io(io, ignore_body = false, decompress = true)Source

def self.from_io(io, ignore_body = false, decompress = true, &block)Source

def self.from_io?(io, ignore_body = false, decompress = true)Source

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.

def self.from_io?(io, ignore_body = false, decompress = true, &block)Source

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.

def self.mandatory_body?(status_code) : BoolSource

def self.new(status_code, body : String? = nil, headers : Headers = Headers.new, status_message = nil, version = "HTTP/1.1", body_io = nil)Source

def self.supports_chunked?(version) : BoolSource

Instance Method Detail

def bodySource

def body? : String?Source

def body_ioSource

def body_io? : IO?Source

def charsetSource

def content_typeSource

def cookiesSource

Returns a convenience wrapper around querying and setting cookie related headers, see HTTP::Cookies.

def headers : HeadersSource

def keep_alive?Source

def status_code : Int32Source

def status_message : StringSource

def success?Source

Returns true if the response status code is between 200 and 299.

def to_io(io)Source

def version : StringSource

© 2012–2017 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.22.0/HTTP/Client/Response.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部