mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 18:09:22 +02:00
use IntoHeaderValue and Header for client request
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
use std::time::SystemTime;
|
||||
use header::{http, HttpDate};
|
||||
|
||||
|
||||
header! {
|
||||
/// `Date` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.1.2)
|
||||
///
|
||||
@ -32,3 +34,9 @@ header! {
|
||||
test_header!(test1, vec![b"Tue, 15 Nov 1994 08:12:31 GMT"]);
|
||||
}
|
||||
}
|
||||
|
||||
impl Date {
|
||||
pub fn now() -> Date {
|
||||
Date(SystemTime::now().into())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user