Struct hyper::header::Referer [] [src]

pub struct Referer(pub String);

Referer header, defined in RFC7231

The Referer [sic] header field allows the user agent to specify a URI reference for the resource from which the target URI was obtained (i.e., the "referrer", though the field name is misspelled). A user agent MUST NOT include the fragment and userinfo components of the URI reference, if any, when generating the Referer field value.

ABNF

Referer = absolute-URI / partial-URI

Example values

  • http://www.example.org/hypertext/Overview.html

Examples

use hyper::header::{Headers, Referer};

let mut headers = Headers::new();
headers.set(Referer("/People.html#tim".to_owned()));
use hyper::header::{Headers, Referer};

let mut headers = Headers::new();
headers.set(Referer("http://www.example.com/index.html".to_owned()));