Crates.io | tide-delay |
lib.rs | tide-delay |
version | 0.0.1 |
source | src |
created_at | 2020-12-31 08:34:15.131866 |
updated_at | 2020-12-31 08:34:15.131866 |
description | Middleware for the Tide web framework that delays responses |
homepage | |
repository | https://gitlab.com/mneumann_ntecs/tide-delay |
max_upload_size | |
id | 329584 |
size | 4,711 |
A middleware for the Tide web framework that delays responses.
let mut app = tide::new();
app.with(tide_delay::DelayMiddleware::new(
std::time::Duration::from_millis(250),
));
app.at("/")
.get(|_| async { Ok(Response::new(StatusCode::Ok)) });