docs(headers): add header examples
This commit is contained in:
		| @@ -17,6 +17,21 @@ header! { | ||||
|     #[doc=""] | ||||
|     #[doc="# Example values"] | ||||
|     #[doc="* `Sat, 29 Oct 1994 19:43:31 GMT`"] | ||||
|     #[doc=""] | ||||
|     #[doc="# Example"] | ||||
|     #[doc="```"] | ||||
|     #[doc="# extern crate hyper;"] | ||||
|     #[doc="# extern crate time;"] | ||||
|     #[doc="# fn main() {"] | ||||
|     #[doc="// extern crate time;"] | ||||
|     #[doc=""] | ||||
|     #[doc="use hyper::header::{Headers, IfModifiedSince, HttpDate};"] | ||||
|     #[doc="use time::{self, Duration};"] | ||||
|     #[doc=""] | ||||
|     #[doc="let mut headers = Headers::new();"] | ||||
|     #[doc="headers.set(IfModifiedSince(HttpDate(time::now() - Duration::days(1))));"] | ||||
|     #[doc="# }"] | ||||
|     #[doc="```"] | ||||
|     (IfModifiedSince, "If-Modified-Since") => [HttpDate] | ||||
|  | ||||
|     test_if_modified_since { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user