[−][src]Struct saphir::header::ProxyAuthorization
Proxy-Authorization
header, defined in RFC7235
The Proxy-Authorization
header field allows a user agent to authenticate
itself with an HTTP proxy -- usually, but not necessarily, after
receiving a 407 (Proxy Authentication Required) response and the
Proxy-Authenticate
header. Its value consists of credentials containing
the authentication information of the user agent for the realm of the
resource being requested.
ABNF
Authorization = credentials
Example values
Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Bearer fpKL54jvWmEGVoRdCNjG
Examples
use hyperx::header::{Headers, ProxyAuthorization}; let mut headers = Headers::new(); headers.set(ProxyAuthorization("let me in".to_owned()));
use hyperx::header::{Headers, ProxyAuthorization, Basic}; let mut headers = Headers::new(); headers.set( ProxyAuthorization( Basic { username: "Aladdin".to_owned(), password: Some("open sesame".to_owned()) } ) );
use hyperx::header::{Headers, ProxyAuthorization, Bearer}; let mut headers = Headers::new(); headers.set( ProxyAuthorization( Bearer { token: "QWxhZGRpbjpvcGVuIHNlc2FtZQ".to_owned() } ) );
Trait Implementations
impl<S> Clone for ProxyAuthorization<S> where
S: Scheme + Clone,
[src]
S: Scheme + Clone,
fn clone(&self) -> ProxyAuthorization<S>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S> Debug for ProxyAuthorization<S> where
S: Scheme + Debug,
[src]
S: Scheme + Debug,
impl<S> Deref for ProxyAuthorization<S> where
S: Scheme,
[src]
S: Scheme,
impl<S> DerefMut for ProxyAuthorization<S> where
S: Scheme,
[src]
S: Scheme,
impl<S> Display for ProxyAuthorization<S> where
S: Scheme,
[src]
S: Scheme,
impl<S> Header for ProxyAuthorization<S> where
S: Scheme + Any,
<S as FromStr>::Err: 'static,
[src]
S: Scheme + Any,
<S as FromStr>::Err: 'static,
fn header_name() -> &'static str
[src]
fn parse_header<'a, T>(raw: &'a T) -> Result<ProxyAuthorization<S>, Error> where
T: RawLike<'a>,
[src]
T: RawLike<'a>,
fn fmt_header(&self, f: &mut Formatter) -> Result<(), Error>
[src]
impl<S> PartialEq<ProxyAuthorization<S>> for ProxyAuthorization<S> where
S: Scheme + PartialEq<S>,
[src]
S: Scheme + PartialEq<S>,
fn eq(&self, other: &ProxyAuthorization<S>) -> bool
[src]
fn ne(&self, other: &ProxyAuthorization<S>) -> bool
[src]
impl<S> StandardHeader for ProxyAuthorization<S> where
S: Scheme + Any + Display,
[src]
S: Scheme + Any + Display,
fn http_header_name() -> HeaderName
[src]
impl<S> StructuralPartialEq for ProxyAuthorization<S> where
S: Scheme,
[src]
S: Scheme,
Auto Trait Implementations
impl<S> RefUnwindSafe for ProxyAuthorization<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for ProxyAuthorization<S>
impl<S> Sync for ProxyAuthorization<S>
impl<S> Unpin for ProxyAuthorization<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for ProxyAuthorization<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T, A, P> Access<T> for P where
A: Access<T>,
P: Deref<Target = A>,
[src]
A: Access<T>,
P: Deref<Target = A>,
type Guard = <A as Access<T>>::Guard
A guard object containing the value and keeping it alive. Read more
fn load(&self) -> <P as Access<T>>::Guard
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
[src]
A: Access<T>,
<A as Access<T>>::Guard: 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,