Created
May 19, 2014 19:05
-
-
Save dharmatech/35eb799a219e7c4038e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn handle_request(&self, _r: &Request, w: &mut ResponseWriter) { | |
w.headers | |
.. date = Some(time::now_utc()) | |
.. content_length = Some(14) | |
.. content_type = Some(MediaType { | |
type_: StrBuf::from_str("text"), | |
subtype: StrBuf::from_str("plain"), | |
parameters: vec!((StrBuf::from_str("charset"), StrBuf::from_str("UTF-8"))) | |
}) | |
.. server = Some(StrBuf::from_str("Example")); | |
w.write(bytes!("Hello, World!\n")).unwrap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment