class HAR::Request
- HAR::Request
- Reference
- Object
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
- JSON::Serializable
Defined in:
har/request.crConstant Summary
-
FORMDATA_MIME_VALUES =
{"application/x-www-form-urlencoded", "multipart/form-data"}
-
Log =
::Log.for(self)
Constructors
- .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)
- .new(pull : JSON::PullParser)
- .new(http_request : HTTP::Request)
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.
-
#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)
-
#method : String
Request method (
GET
,POST
, ...). -
#method=(method : String)
Request method (
GET
,POST
, ...). - #post_data : PostData | Nil
- #post_data=(post_data : PostData | Nil)
- #query_string : Array(QueryString)
- #query_string=(query_string : Array(QueryString))
- #query_string_http_params : URI::Params
- #to_http_request : HTTP::Request
- #uri : URI
-
#url : String
Absolute URL of the request (fragments are not included).
-
#url=(url : String)
Absolute URL of the request (fragments are not included).
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)
#