pub struct RequestOptions {
pub headers: Vec<Header>,
pub auth: Option<Auth>,
pub allow_cross_origin_auth: bool,
}Expand description
Per-task request overrides applied by every backend.
Fields§
§headers: Vec<Header>Additional headers applied to every request of the task.
auth: Option<Auth>Authentication that backends translate into request headers.
allow_cross_origin_auth: boolWhether credential headers may follow redirects to another origin.
Defaults to false, which strips them on cross-origin redirects.
Implementations§
Source§impl RequestOptions
impl RequestOptions
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether there is nothing to apply: no headers, no auth, and cross-origin auth not enabled.
Sourcepub fn merged(&self, defaults: &[Header]) -> Self
pub fn merged(&self, defaults: &[Header]) -> Self
Merge global defaults with task overrides. Task headers win on name
collisions (case-insensitive). Auth becomes an Authorization header
unless the user already supplied one explicitly.
Sourcepub fn sensitive_header_names(&self) -> BTreeSet<String>
pub fn sensitive_header_names(&self) -> BTreeSet<String>
Header names that must never be forwarded across origins.
Trait Implementations§
Source§impl Clone for RequestOptions
impl Clone for RequestOptions
Source§impl Debug for RequestOptions
impl Debug for RequestOptions
Source§impl Default for RequestOptions
impl Default for RequestOptions
Source§impl<'de> Deserialize<'de> for RequestOptions
impl<'de> Deserialize<'de> for RequestOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RequestOptions
Source§impl PartialEq for RequestOptions
impl PartialEq for RequestOptions
Source§impl Serialize for RequestOptions
impl Serialize for RequestOptions
impl StructuralPartialEq for RequestOptions
Auto Trait Implementations§
impl Forget for RequestOptions
impl Freeze for RequestOptions
impl Move for RequestOptions
impl RefUnwindSafe for RequestOptions
impl Send for RequestOptions
impl Sync for RequestOptions
impl Unpin for RequestOptions
impl UnsafeUnpin for RequestOptions
impl UnwindSafe for RequestOptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.