struct Protocol::Network::Request

Overview

HTTP request data.

Included Modules

Defined in:

protocol/network.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def has_post_data : Bool | Nil #

True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.


[View source]
def headers : Headers #

HTTP request headers.


[View source]
def initial_priority : ResourcePriority #

Priority of the resource request at the time request is sent.


[View source]
def is_link_preload : Bool | Nil #

Whether is loaded via link preload.


[View source]
def is_same_site : Bool | Nil #

True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame.


[View source]
def method : String #

HTTP request method.


[View source]
def mixed_content_type : Security::MixedContentType | Nil #

The mixed content type of the request.


[View source]
def post_data : String | Nil #

HTTP POST request data.


[View source]
def post_data_entries : Array(PostDataEntry) | Nil #

Request body elements. This will be converted from base64 to binary


[View source]
def referrer_policy : String #

The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/


[View source]
def trust_token_params : TrustTokenParams | Nil #

Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend.


[View source]
def url : String #

Request URL (without fragment).


[View source]
def url_fragment : String | Nil #

Fragment of the requested URL starting with hash, if present.


[View source]