pub struct RequestBuilder { /* private fields */ }Expand description
Builder for Request.
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn url<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Request URL (without fragment).
Sourcepub fn url_fragment<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn url_fragment<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Fragment of the requested URL starting with hash, if present.
Sourcepub fn headers<VALUE: Into<Headers>>(&mut self, value: VALUE) -> &mut Self
pub fn headers<VALUE: Into<Headers>>(&mut self, value: VALUE) -> &mut Self
HTTP request headers.
Sourcepub fn post_data<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn post_data<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
HTTP POST request data. Use postDataEntries instead.
Sourcepub fn has_post_data<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn has_post_data<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
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.
Sourcepub fn post_data_entries<VALUE: Into<Vec<PostDataEntry>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn post_data_entries<VALUE: Into<Vec<PostDataEntry>>>( &mut self, value: VALUE, ) -> &mut Self
Request body elements (post data broken into individual entries).
Sourcepub fn mixed_content_type<VALUE: Into<MixedContentType>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn mixed_content_type<VALUE: Into<MixedContentType>>( &mut self, value: VALUE, ) -> &mut Self
The mixed content type of the request.
Sourcepub fn initial_priority<VALUE: Into<ResourcePriority>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn initial_priority<VALUE: Into<ResourcePriority>>( &mut self, value: VALUE, ) -> &mut Self
Priority of the resource request at the time request is sent.
Sourcepub fn referrer_policy<VALUE: Into<RequestReferrerPolicy>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn referrer_policy<VALUE: Into<RequestReferrerPolicy>>( &mut self, value: VALUE, ) -> &mut Self
The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
Sourcepub fn is_link_preload<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn is_link_preload<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether is loaded via link preload.
Sourcepub fn trust_token_params<VALUE: Into<TrustTokenParams>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn trust_token_params<VALUE: Into<TrustTokenParams>>( &mut self, value: VALUE, ) -> &mut Self
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.
Sourcepub fn is_same_site<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn is_same_site<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
True if this resource request is considered to be the ‘same site’ as the request corresponding to the main frame.
True when the resource request is ad-related.
Trait Implementations§
Source§impl Clone for RequestBuilder
impl Clone for RequestBuilder
Source§fn clone(&self) -> RequestBuilder
fn clone(&self) -> RequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more