Skip to content

Instantly share code, notes, and snippets.

@uplus
Last active September 7, 2017 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uplus/bf2c083cc415dbc76c3f7a9d39b243e8 to your computer and use it in GitHub Desktop.
Save uplus/bf2c083cc415dbc76c3f7a9d39b243e8 to your computer and use it in GitHub Desktop.
if let Some(cookies) = req.headers.get::<iron::headers::Cookie>() {
for cookie in cookies.iter() {
// cookie is &String
if let Ok(cookie) = cookie::Cookie::parse(&cookie) {
// cookie is &Cookie
println!("{:?}", cookie);
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment