reqwest-middleware
reqwest-middleware copied to clipboard
Wrapper around reqwest to allow for client middleware chains.
This replaces task-local-extensions with http's extensions, as http was already in the dependency closure anyway and the other features of task-local-extensions (that required an incompatible-with-wasm part of tokio) were not...
Added functionality that allows you to specify custom functions that will direct whether a request will be retried or not. The implementation doesn't interfere with the already existing API. ##...
## Motivations This is a random thought, but it might be worth tracking. We have task-local-extensions to provide a type agnostic data for middlewares. http::Request also has their own. ##...
There is currently no wrapper for reqwest::Response. As a result, resp.body().await? call is not retried. In the case where the response is large, resp.body() call involves a lot of tcp...
## Motivations The local `Error` is a simple enum between the underlying `reqwest::Error` and middleware errors. It would be nice if this `Error` implemented the same interface as `reqwest::Error`, esp...
I tried to add a new middleware for handling rate-limit headers. The idea was to use https://github.com/mre/rate-limits for extracting these headers and sleeping for a certain duration if we got...
## Motivations I'm building a type-safe API client around an untyped REST API, and I'm trying to accept dynamic `Middleware`. Because this client's builder's stack is dynamic, the middleware needs...
## Motivations For use-cases where the whole body is received as a single, not too large blob, the current behaviour makes sense but for e.g. downloading media files it would...
Hello, I am wondering whether it'd be possible for a future version of `reqwest_middleware` to leave out the dependency on `anyhow::Error`. https://github.com/TrueLayer/reqwest-middleware/blob/8d40b60776eeba807e5a78fcb6d1ddab71faab55/reqwest-middleware/src/error.rs#L10 - As a "library-level" crate, we should use...
## Motivations In Jaeger, we can look up on spans of services that depend on another services like this.   In this example, I made the requests from chant-service...