Crates.io | retry-after |
lib.rs | retry-after |
version | 0.4.0 |
source | src |
created_at | 2016-03-29 15:57:03.627651 |
updated_at | 2024-03-14 03:25:02.987648 |
description | Retry-After header for Hyper's header module |
homepage | |
repository | https://github.com/jwilm/retry-after |
max_upload_size | |
id | 4608 |
size | 24,610 |
Retry-After header for Hyper. Implemented according to RFC7231-7.1.3.
For more in-depth examples, please see the examples directory.
extern crate chrono;
extern crate retry_after;
use chrono::{Duration, UTC};
use retry_after::RetryAfter;
fn main() {
// Create a RetryAfter::Delay header
let retry_after_delay = RetryAfter::Delay(Duration::seconds(300));
// Create a RetryAfter::DateTime header
let retry_after_dt = RetryAfter::DateTime(UTC::now() + Duration::seconds(300));
}