Commit Graph

37 Commits (0bdb2b6ef4c955c1fe06fa101d974f88ecc2b9f3)

Author SHA1 Message Date
Conrad Ludgate 60212ae451
reqwest 0.12 and other breaking changes (#135)
* 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
2024-04-03 18:13:10 +01:00
Vasiliy Taranov 2a3f239a05
fix typos, add github action (#122) 2024-03-12 15:10:18 +00:00
Ethan Brierley b53d355aea
chore!(reqwest-retry): bump minor version 🚀 2024-03-05 12:10:10 +00:00
bbaldino 4bdf56f2e0
Adapt to retry-policies changes (#113) 2024-03-05 12:05:19 +00:00
Ethan Brierley d297b1c5df
chore: `cargo fmt` 2023-11-07 09:59:22 +00:00
Jan Srzednicki b7017dca6f
Document using `tokio::time::sleep` (#111)
* Document using `tokio::time::sleep`

* Update reqwest-retry/src/middleware.rs

---------

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2023-11-07 09:35:16 +00:00
Ethan Brierley 304d6f1ebc
ci: fix `rustdoc::redundant_explicit_links` (#110) 2023-10-24 10:50:53 +01:00
Thom Wright 7eb52bbe65
[EWT-319] Upgrade retry-policies (#104) 2023-09-08 10:22:46 +01:00
tl-rodrigo-gryzinski c2d477edae
[reqwest-retry] Patch release (#102) 2023-08-30 13:15:36 +01:00
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
Conrad Ludgate 80d56d89f3
release middleware 2023-05-11 14:17:05 +01:00
Matthew Gapp f8ff599f50
fix: remove middleware retry limit (#87)
* 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
2023-04-17 13:02:13 +01:00
Léo Gaspard fef18b3506
feat: wasm32-unknown-unknown support (#79)
* 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>
2023-03-09 11:33:13 +00: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 e2635c9f8d
Add note about streaming requests in RetryTransientMiddleware docs (#51) 2022-07-21 16:39:15 +01:00
Conrad Ludgate b3f7ce40d3
fix recursion in retry (#49) 2022-07-09 23:34:23 +01:00
tl-flavio-barinas ad18935d1f
bump/use alpha versions (#48) 2022-06-30 16:08:59 +01:00
tl-flavio-barinas 8a6b2ea571
bump reqwest-tracing to v0.2.3 (#46)
* (cargo-release) reqwest-tracing v0.2.3

* sort dependencies

* Fix dependency versions

* Fix reqwest-middleware dependency

Co-authored-by: azanin <ale.zanin90@gmail.com>
2022-06-29 15:06:52 +01:00
Rodrigo Gryzinski 8f6af94914 bump versions and update changelog for reqwest-tracing 2022-04-21 18:53:32 +01:00
Rodrigo Gryzinski 57ee4ec439 (cargo-release) version 0.1.5 2022-04-21 18:49:16 +01:00
Rodrigo Gryzinski e9fd6f80ea (cargo-release) version 0.1.6 2022-04-21 18:49:16 +01: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
Luca Palmieri 53b8b066f3 (cargo-release) start next development iteration 0.1.5-alpha.0 2022-01-24 11:26:25 +00:00
Luca Palmieri d3fe5acf02 (cargo-release) start next development iteration 0.1.4-alpha.0 2021-12-06 16:20:20 +00:00
Luca Palmieri 525f62039f
Fix clippy lint. (#23) 2021-12-06 16:06:23 +00:00
Alessandro Caprarelli 849f982f5e chore(toml): update version field to the next 2021-10-18 16:54:38 +02:00
Alessandro C 6ff6393ad8
fix: remove security time v0.1 dependency (#16) 2021-10-18 16:24:36 +02:00
Alessandro C dc6f1b460f
fix(retry): handle hyper::Error(IncompleteMessage) as Transient (#14) 2021-10-18 12:18:47 +02: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 9cb81b2f89 Prepare next release iteration 0.1.2 2021-09-15 11:04:03 +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