docs(headers): add header examples
This commit is contained in:
		@@ -16,6 +16,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, LastModified, HttpDate};"]
 | 
			
		||||
    #[doc="use time::{self, Duration};"]
 | 
			
		||||
    #[doc=""]
 | 
			
		||||
    #[doc="let mut headers = Headers::new();"]
 | 
			
		||||
    #[doc="headers.set(LastModified(HttpDate(time::now() - Duration::days(1))));"]
 | 
			
		||||
    #[doc="# }"]
 | 
			
		||||
    #[doc="```"]
 | 
			
		||||
    (LastModified, "Last-Modified") => [HttpDate]
 | 
			
		||||
 | 
			
		||||
    test_last_modified {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user