Commit Graph

34 Commits (9ac5f691bfdb7f3b9974a48605647242fd8538ce)

Author SHA1 Message Date
Ben Beasley 1954b5c94f
Fix missing LICENSE-* files in released crates (#147)
* Fix missing LICENSE-* files in released crates

* Changelog: Included license files in crates
2024-04-26 13:53:50 +01:00
Ethan Brierley e778b7df11
chore: revert change switching from `Arc` to `Box` in public APIs (#142)
fixes #139

There are other potential long term solutions listed [here](https://github.com/TrueLayer/reqwest-middleware/issues/139#issuecomment-2045946644)

> I didn't put much thought into it. Internally there used to be a `Box<[Arc<dyn Middleware>]>` which is cloned about quite often.
>
> * https://docs.rs/reqwest-middleware/0.2.5/src/reqwest_middleware/client.rs.html#87
> * https://docs.rs/reqwest-middleware/0.2.5/src/reqwest_middleware/client.rs.html#139
>
> Because of all the cloning, I decided to flip it to be `Arc<Box>` instead of `Box<Arc>`.
>
> I see three solutions here.
>
> 1. The one I'd lean towards is `Arc<Arc>` even if it's a bit silly, but prevents extra unnecessary allocations on each request.
> 2. An alternative is to implement Middleware for Arc and then you can use the regular with(...) api. This would mean there's an extra box around your middleware
> 3. Revert this particular change

In the short term, I think it's best to go with option 3. This will unblock the next release. We can consider the other options for future releasees
2024-04-10 09:30:17 +01:00
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
Ethan Brierley 69269e183a
chore(request-middleware): release patch version 🚀 (#131) 2024-03-15 16:27:00 +00:00
Pohan 0edce5364e
Update reqwest version to 0.11.10 (#115)
* Update reqwest version to 0.11.10

* chore: udpate the correct version

---------

Co-authored-by: Ethan Brierley <ethan.brierley@truelayer.com>
2024-03-15 16:18:04 +00:00
Ari de1b651bcc
add fetch_mode_no_cors_method (#108)
* add fetch_mode_no_cors_method

* Update changelog

* Bump verion
2023-10-24 10:39:06 +01:00
Ethan Brierley a530ea7f93
Cut `reqwest-middleware` patch release `0.2.3 (#98) 2023-08-07 10:50:56 +01:00
Oleh Martsokha 31f8aebce4
Impl reqwest::Error methods (#96)
* impl reqwest::Error methods

* update changelog

* use reqwest::StatusCode

* typo

* consistent comments

* fn is_middleware()
2023-08-07 10:34:01 +01:00
Conrad Ludgate 80d56d89f3
release middleware 2023-05-11 14:17:05 +01:00
Jeramy Singleton d5e71a0c89
Added version function to RequestBuilder impl (#90)
* Adds version function to RequestBuilder impl

Addresses an issue where the Http version of a request cannot be changed when using reqwest_middleware

* Removes  function from wasm compiles

---------

Co-authored-by: Jeramy Singleton <wisingle@microsoft.com>
2023-05-11 13:30:15 +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
Conrad Ludgate 289bb0452c
bump all versions (#71) 2022-11-15 10:31:34 +00:00
Balaji Arun 2e57e95f99
Borrow self when try_clone and clone inner client. (#60)
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2022-11-07 13:14:02 +00:00
Conrad Ludgate 85e520f78b
extensions middleware and request extensions (#56)
* extensions middleware and request extensions

* fix publish

* request initialisers

* simplify example

* docs

* changelog

* Apply suggestions from code review

Co-authored-by: Alex Butler <alexheretic@gmail.com>

Co-authored-by: Alex Butler <alexheretic@gmail.com>
2022-09-30 10:14:31 +01:00
Tomasz Andrzejak 360f23c952
Add implementation of `Debug` trait for `RequestBuilder`. (#50) 2022-07-21 13:23:27 +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 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 992221d48a (cargo-release) version 0.1.4 2022-01-24 11:25:35 +00:00
Christian Haynes 8b8d22cafd
moved to finish_non_exhaustive in Debug impl for ClientWithMiddleware (#27) 2022-01-24 11:24:34 +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 00f28c3bf0 (cargo-release) version 0.1.3 2021-12-06 16:19:44 +00:00
Christian Haynes 6cbea8d7e6
added custom Debug implementation for ClientWithMiddleware, skipping middleware_stack field (#22) 2021-12-06 16:18:49 +00: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 c98f59b165 Rollback reqwest-middleware version to satisfy CI 2021-09-15 11:23:01 +01:00
Rodrigo Gryzinski 9cb81b2f89 Prepare next release iteration 0.1.2 2021-09-15 11:04:03 +01:00
Rodrigo Gryzinski 0eece565db (cargo-release) version 0.1.1 2021-09-15 10:26:05 +01:00
TehPers 9b8cbffb40
Add (send/execute)_with_extensions (#4)
* Add (send/execute)_with_extensions
2021-09-01 15:08:34 +01:00
Rodrigo Gryzinski 7fe55152ec Initial commit 2021-08-13 08:59:58 +01:00