1
0
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:
Nikolay Kim
2018-03-06 15:18:04 -08:00
parent ceb97cd6b9
commit 14a511bdad
3 changed files with 54 additions and 8 deletions

View File

@ -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())
}
}