class HAR::Response
- HAR::Response
- Reference
- Object
Overview
This object contains detailed info about the response.
The total response size received can be computed as follows (if both values are available):
total_size = entry.response.headers_size + entry.response.body_size
Included Modules
- JSON::Serializable
Defined in:
har/response.crConstructors
- .new(status : Int32, status_text : String, http_version : String, content : HAR::Content, redirect_url : Nil | String = nil, cookies : Array(HAR::Cookie) = Array(Cookie).new, headers : Array(HAR::Header) = Array(Header).new, headers_size : Int32 | Nil = nil, body_size : Int32 | Nil = nil, comment : Nil | String = nil)
- .new(pull : JSON::PullParser)
- .new(http_response : HTTP::Client::Response)
Instance Method Summary
- #body : String | Nil
- #body_size : Int32 | Nil
- #body_size=(body_size : Int32 | Nil)
-
#comment : String | Nil
A comment provided by the user or the application.
-
#comment=(comment : String | Nil)
A comment provided by the user or the application.
-
#content : Content
Details about the response body.
-
#content=(content : Content)
Details about the response body.
- #content_type : String | Nil
-
#cookies : Array(Cookie)
List of cookie objects.
-
#cookies=(cookies : Array(Cookie))
List of cookie objects.
-
#headers : Array(Header)
List of header objects.
-
#headers=(headers : Array(Header))
List of header objects.
- #headers_size : Int32 | Nil
- #headers_size=(headers_size : Int32 | Nil)
- #http_cookies : HTTP::Cookies
- #http_cookies=(http_cookies : HTTP::Cookies)
- #http_headers : HTTP::Headers
- #http_headers=(http_headers : HTTP::Headers)
- #http_version : String
- #http_version=(http_version : String)
- #mime_type : MIME::MediaType | Nil
- #redirect_url : String | Nil
- #redirect_url=(redirect_url : String | Nil)
-
#status : Int32
Response status code.
-
#status=(status : Int32)
Response status code.
- #status_text : String
- #status_text=(status_text : String)
- #to_http_response : HTTP::Client::Response
Constructor Detail
def self.new(status : Int32, status_text : String, http_version : String, content : HAR::Content, redirect_url : Nil | String = nil, cookies : Array(HAR::Cookie) = Array(Cookie).new, headers : Array(HAR::Header) = Array(Header).new, headers_size : Int32 | Nil = nil, body_size : Int32 | Nil = nil, comment : Nil | String = nil)
#