pub struct Request {
pub url: String,
pub url_fragment: Option<String>,
pub method: String,
pub headers: Headers,
pub has_post_data: Option<bool>,
pub post_data_entries: Option<Vec<PostDataEntry>>,
pub mixed_content_type: Option<MixedContentType>,
pub initial_priority: ResourcePriority,
pub referrer_policy: RequestReferrerPolicy,
pub is_link_preload: Option<bool>,
pub trust_token_params: Option<TrustTokenParams>,
pub is_same_site: Option<bool>,
}
Expand description
HTTP request data. Request
Fields§
§url: String
Request URL (without fragment).
url_fragment: Option<String>
Fragment of the requested URL starting with hash, if present.
method: String
HTTP request method.
headers: Headers
HTTP request headers.
has_post_data: Option<bool>
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.
post_data_entries: Option<Vec<PostDataEntry>>
Request body elements (post data broken into individual entries).
mixed_content_type: Option<MixedContentType>
The mixed content type of the request.
initial_priority: ResourcePriority
Priority of the resource request at the time request is sent.
referrer_policy: RequestReferrerPolicy
The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
is_link_preload: Option<bool>
Whether is loaded via link preload.
trust_token_params: Option<TrustTokenParams>
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.
is_same_site: Option<bool>
True if this resource request is considered to be the ‘same site’ as the request corresponding to the main frame.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Request, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Request, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Request
impl Serialize for Request
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more