reqwest-middleware
reqwest-middleware copied to clipboard
Wrapper around reqwest to allow for client middleware chains.
## Motivations I know there have been a [couple](https://github.com/TrueLayer/reqwest-middleware/issues/107) [issues](https://github.com/TrueLayer/reqwest-middleware/issues/106) filed about confusion regarding `ExponentialBackoffTimed`--I had the same confusion myself, which is how I came across those issues. I think...
## Bug description Currently, it is not possible to create custom `RetryPolicy` implementations because the `RetryDecision` type is not exposed by the crate. So its a bit all or nothing...
## Motivations > [taken from #57] > There is currently no wrapper for `reqwest::Response`. As a result, resp.body().await? [...] ... returns a `reqwest::Error` instead of `reqwest_middleware::Error`. ## Solution It would...
```bash error[E0308]: mismatched types --> src/main.rs:?:? | ? | self.client.get(url).send().await | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result`, found `Result` | = note: expected enum `Result
As a user or developer, it is hard to tell whether a request failed randomly and was not retried, or whether it failed even with retries (e.g. https://github.com/astral-sh/uv/issues/3514). This PR...
I want to log all HTTP requests my client makes for debug purposes. But the requests contain sensitive information that I do not want to appear inside the log. This...
Does it support [Retry-After](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)? > The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header...
## Motivations I tried to register a new field [http.request.resend_count](https://opentelemetry.io/docs/specs/semconv/attributes-registry/http/) to my Otel trace but I don't have access to this information by implementing ReqwestOtelSpanBackend. ## Solution Register the number...