docs(headers): add header examples
This commit is contained in:
@@ -15,6 +15,20 @@ header! {
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `/People.html#tim`"]
|
||||
#[doc="* `http://www.example.net/index.html`"]
|
||||
#[doc=""]
|
||||
#[doc="# Examples"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, Location};"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set(Location(\"/People.html#tim\".to_owned()));"]
|
||||
#[doc="```"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, Location};"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set(Location(\"http://www.example.com/index.html\".to_owned()));"]
|
||||
#[doc="```"]
|
||||
// TODO: Use URL
|
||||
(Location, "Location") => [String]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user