retry-after

Crates.ioretry-after
lib.rsretry-after
version0.4.0
sourcesrc
created_at2016-03-29 15:57:03.627651
updated_at2024-03-14 03:25:02.987648
descriptionRetry-After header for Hyper's header module
homepage
repositoryhttps://github.com/jwilm/retry-after
max_upload_size
id4608
size24,610
Joe Wilm (jwilm)

documentation

https://jwilm.github.io/retry-after/retry_after/

README

retry-after

Build Status Crates.io Version

Retry-After header for Hyper. Implemented according to RFC7231-7.1.3.

Usage

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));
}
Commit count: 9

cargo fmt