Build SetCookie from CookieJar
This commit is contained in:
committed by
Sean McArthur
parent
0a624b10e0
commit
20f156c592
@@ -1,6 +1,7 @@
|
||||
use header::Header;
|
||||
use std::fmt;
|
||||
use std::str::from_utf8;
|
||||
use cookie::CookieJar;
|
||||
|
||||
/// The `Set-Cookie` header
|
||||
///
|
||||
@@ -40,3 +41,12 @@ impl Header for SetCookie {
|
||||
}
|
||||
}
|
||||
|
||||
impl SetCookie {
|
||||
/// Use this to crate SetCookie header from CookieJar using
|
||||
/// calculated delta.
|
||||
#[allow(dead_code)]
|
||||
fn from_cookie_jar(jar: &CookieJar) -> SetCookie {
|
||||
SetCookie(jar.delta())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user