Struct trillium_http_types::other::Referer [−][src]
pub struct Referer { /* fields omitted */ }Expand description
Contains the address of the page making the request.
Important: Although this header has many innocent uses it can have undesirable consequences for user security and privacy.
Specifications
Examples
use http_types::{Response, Url}; use http_types::other::Referer; let referer = Referer::new(Url::parse("https://example.net/")?); let mut res = Response::new(200); res.insert_header(&referer, &referer); let base_url = Url::parse("https://example.net/")?; let referer = Referer::from_headers(base_url, res)?.unwrap(); assert_eq!(referer.location(), &Url::parse("https://example.net/")?);
Implementations
Create a new instance from headers.
Trait Implementations
Access the header’s name.
Access the header’s value.
Auto Trait Implementations
impl RefUnwindSafe for Refererimpl UnwindSafe for Referer