class HAR::Request

Overview

This object contains detailed info about performed request.

The total request size sent can be computed as follows (if both values are available):

total_size = entry.request.headers_size + entry.request.body_size

Included Modules

Defined in:

har/request.cr

Constant Summary

FORMDATA_MIME_VALUES = {"application/x-www-form-urlencoded", "multipart/form-data"}
Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(method : String, url : String, http_version : String, cookies : Array(HAR::Cookie) = Array(Cookie).new, headers : Array(HAR::Header) = Array(Header).new, query_string : Array(HAR::QueryString) = Array(QueryString).new, post_data : Nil | HAR::PostData = nil, 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_request : HTTP::Request) #

[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 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 method : String #

Request method (GET, POST, ...).


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

Request method (GET, POST, ...).


[View source]
def post_data : PostData | Nil #

[View source]
def post_data=(post_data : PostData | Nil) #

[View source]
def query_string : Array(QueryString) #

[View source]
def query_string=(query_string : Array(QueryString)) #

[View source]
def query_string_http_params : URI::Params #

[View source]
def to_http_request : HTTP::Request #

[View source]
def uri : URI #

[View source]
def url : String #

Absolute URL of the request (fragments are not included).


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

Absolute URL of the request (fragments are not included).


[View source]