class HAR::Response

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

Defined in:

har/response.cr

Constructors

Instance Method Summary

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) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(http_response : HTTP::Client::Response) #

[View source]

Instance Method Detail

def body : String | Nil #

[View source]
def body_size : Int32 | Nil #

[View source]
def body_size=(body_size : Int32 | Nil) #

[View source]
def comment : String | Nil #

A comment provided by the user or the application.


[View source]
def comment=(comment : String | Nil) #

A comment provided by the user or the application.


[View source]
def content : Content #

Details about the response body.


[View source]
def content=(content : Content) #

Details about the response body.


[View source]
def content_type : String | Nil #

[View source]
def cookies : Array(Cookie) #

List of cookie objects.


[View source]
def cookies=(cookies : Array(Cookie)) #

List of cookie objects.


[View source]
def headers : Array(Header) #

List of header objects.


[View source]
def headers=(headers : Array(Header)) #

List of header objects.


[View source]
def headers_size : Int32 | Nil #

[View source]
def headers_size=(headers_size : Int32 | Nil) #

[View source]
def http_cookies : HTTP::Cookies #

[View source]
def http_cookies=(http_cookies : HTTP::Cookies) #

[View source]
def http_headers : HTTP::Headers #

[View source]
def http_headers=(http_headers : HTTP::Headers) #

[View source]
def http_version : String #

[View source]
def http_version=(http_version : String) #

[View source]
def mime_type : MIME::MediaType | Nil #

[View source]
def redirect_url : String | Nil #

[View source]
def redirect_url=(redirect_url : String | Nil) #

[View source]
def status : Int32 #

Response status code.


[View source]
def status=(status : Int32) #

Response status code.


[View source]
def status_text : String #

[View source]
def status_text=(status_text : String) #

[View source]
def to_http_response : HTTP::Client::Response #

[View source]