pub struct Header { /* fields omitted */ }
Wrapper type for a header line.
The header name.
let header = "X-Forwarded-For: 127.0.0.1"
.parse::<ureq::Header>()
.unwrap();
assert_eq!("X-Forwarded-For", header.name());
The header value.
let header = "X-Forwarded-For: 127.0.0.1"
.parse::<ureq::Header>()
.unwrap();
assert_eq!("127.0.0.1", header.value());
Compares the given str to the header name ignoring case.
let header = "X-Forwarded-For: 127.0.0.1"
.parse::<ureq::Header>()
.unwrap();
assert!(header.is_name("x-forwarded-for"));
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The associated error which can be returned from parsing.
Parses a string s
to return a value of this type. Read more