- 🔭 I’m currently working on nanostorm
melotic / reqwest-retry-after Goto Github PK
View Code? Open in Web Editor NEWAdds support for the Retry-After header in reqwest.
License: MIT License
Adds support for the Retry-After header in reqwest.
License: MIT License
Pretty new to Rust so apologies if I am holding the tool wrong.
But I am trying to do the minimal example from the docs and I am getting this:
error[E0277]: expected a `Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, Next<'a>)>` closure, found `RetryAfterMiddleware`
--> mylib\src\lib.rs:32:15
|
32 | .with(retry_after_middleware)
| ---- ^^^^^^^^^^^^^^^^^^^^^^ expected an `Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, Next<'a>)>` closure, found `RetryAfterMiddleware`
| |
| required by a bound introduced by this call
|
= help: the trait `for<'a> Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, Next<'a>)>` is not implemented for `RetryAfterMiddleware`
= note: required for `RetryAfterMiddleware` to implement `reqwest_middleware::Middleware`
note: required by a bound in `reqwest_middleware::ClientBuilder::with`
--> C:\Users\username\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reqwest-middleware-0.2.2\src\client.rs:39:12
|
37 | pub fn with<M>(self, middleware: M) -> Self
| ---- required by a bound in this associated function
38 | where
39 | M: Middleware,
| ^^^^^^^^^^ required by this bound in `ClientBuilder::with`
repro:
use reqwest_middleware::{ClientBuilder, ClientWithMiddleware};
use reqwest_retry_after::RetryAfterMiddleware;
let client = ClientBuilder::new(reqwest::Client::new())
.with(RetryAfterMiddleware::new())
.build();
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Cargo.toml
async-trait 0.1.77
reqwest 0.11.23
reqwest-middleware 0.2.4
tokio 1.35.1
task-local-extensions 0.1.4
tokio 1.35.1
httpmock 0.7.0
.github/workflows/main.yml
actions/checkout v4
actions-rs/toolchain v1
actions-rs/cargo v1
actions/checkout v4
actions-rs/toolchain v1
actions-rs/cargo v1
actions/checkout v4
actions-rs/toolchain v1
actions-rs/cargo v1
actions/checkout v4
actions-rs/toolchain v1
actions-rs/clippy-check v1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.