```
error: doc list item missing indentation
Error: --> reqwest-retry/src/middleware.rs:62:4
|
62 | /// `Body`'s `From<String>` or `From<Bytes>` implementations.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
help: indent this line
|
62 | /// `Body`'s `From<String>` or `From<Bytes>` implementations.
| ++
error: doc list item missing indentation
Error: --> reqwest-retry/src/middleware.rs:65:4
|
65 | /// source directly, avoiding the issue of streaming requests not being clonable.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
65 | /// source directly, avoiding the issue of streaming requests not being clonable.
| ++
error: could not compile `reqwest-retry` (lib) due to 2 previous errors
```
* update reqwest and http crates
remove task_local_extensions
* remove older opentelemetry packages
* remove more legacy and add new otel
* attempt to make features additive
* features are additive
* delete commented out code
* build split
* docs
* more uniform with reqwest::Client
* remove arcs
* slight optimisation
* update readmes
* update changelog
* Add a generic function to the middleware struct for the `Retryable` decision.
The generic function can be used to define custom behaviour to decide whether to retry a request or not.
By default, this function is `Retryable::from_reqwest_response` which is the same as it was before.
* Add a way to create custom retry policies.
A RetryStrategy will dictate what decision will be made based on the result of the sent request.
* Add RetryableStrategy in the `RetryTransientMiddleware` struct instead of the seperate functions
* Add constructor to create a `RetryTransientMiddleware` with a custom `RetryableStrategy`
* Run `cargo fmt`
* Add example code to the `RetryableStrategy` struct
* Run `cargo fmt`
* Updated changelog
* use a trait
* docs
* include latest changes
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* refactor: Simplify retry middleware in reqwest.
Removed retry limit:
- Remove MAXIMUM_NUMBER_OF_RETRIES metadata and references in middleware.rs
- Correct mispelling: retry_decision to retry_decision in middleware.rs
- Update Retryable matching to only match Retryable::Transient in middleware.rs
- Simplify branching by removing n_past_retries < MAXIMUM_NUMBER_OF_RETRIES condition in middleware.rs
* test: Remove retry cap assertion from test file
remove retry limit assertion test
* feat: wasm32-unknown-unknown support
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 used anyway.
* feat: have ci check that wasm32-unknown-unknown keeps compiling
* revert back to task-local-extensions
* fix ci
* fix random on wasm
* fix ci again
* bump
---------
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>