Commit Graph

11 Commits (7b3493d96c92ef2f5fc855fb0a921772f1b56ffe)

Author SHA1 Message Date
Rutger 594075583c
Added a way to specify custom functions which decide whether a request should be retried or not (#33)
* 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>
2023-05-22 11:53:31 +01:00
tl-helge-hoff f854725791
feat: classify io error connection reset by peer (#78)
* feat: classify io error connection reset by peer

* doc: explain tests

* chore: add changelog

* fix: use and_then

* chore: docs and clippy

* chore: bump reqwest-retry to 0.2.1

* fix: use get_source_error_type

* fix: remove unused import

* fix: make clippy happy

* doc: describe canceled
2022-12-02 10:57:24 +01:00
Conrad Ludgate 289bb0452c
bump all versions (#71) 2022-11-15 10:31:34 +00:00
tl-rodrigo-gryzinski 5f180155ef
Release reqwest middleware 0.1.5 (#31)
* (cargo-release) reqwest-middleware version 0.1.5
* (cargo-release) reqwest-retry version 0.1.4
* (cargo-release) reqwest-tracing version 0.2.1
* (cargo-release) reqwest-middleware start next development iteration 0.1.6-alpha.0
* (cargo-release) reqwest-retry start next development iteration 0.1.5-alpha.0
* (cargo-release) reqwest-tracing start next development iteration 0.2.2-alpha.0
* Updated CHANGELOGS for 0.1.4 and 0.1.5
2022-02-21 12:50:18 +00:00
tl-rodrigo-gryzinski 52de87e5a2
Release reqwest-retry 0.1.2 (#11)
* chore: version bump reqwest-retry to 0.1.2
* bump reqwest-retry to next development version
2021-09-28 21:48:55 +01:00
tl-rodrigo-gryzinski c05fd77b3f
chore: version bump reqwest-middleware to 0.1.2 (#10) 2021-09-28 19:57:28 +01:00
tl-rodrigo-gryzinski 9c82a35a90
chore: Move to task-local-extensions (#9)
* chore: Move to task-local-extensions
2021-09-28 19:50:23 +01:00
tl-rodrigo-gryzinski b8645f81eb
Include README in crate doctests and improve documentation (#8)
* chore: Improve docs and include some examples in doctests
2021-09-28 19:26:03 +01:00
Conrad Ludgate e0b01383d6
Reqwest default features (#7)
* feat: disable default features for reqwest
2021-09-28 11:17:10 +01:00
Rodrigo Gryzinski c32ae4186c Prepare release reqwest-retry-0.1.1 2021-09-15 10:55:59 +01:00
Rodrigo Gryzinski 7fe55152ec Initial commit 2021-08-13 08:59:58 +01:00