mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2024-12-26 10:56:32 +00:00
bump all versions (#71)
This commit is contained in:
parent
197f19781d
commit
289bb0452c
7 changed files with 35 additions and 15 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -6,11 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.0] - 2022-11-15
|
||||
|
||||
### Changed
|
||||
- `RequestBuilder::try_clone` has a fixed function signature now
|
||||
|
||||
### Removed
|
||||
- `RequestBuilder::send_with_extensions` - use `RequestBuilder::with_extensions` + `RequestBuilder::send` instead.
|
||||
|
||||
### Added
|
||||
- Implementation of `Debug` trait for `RequestBuilder`.
|
||||
- A new `RequestInitialiser` trait that can be added to `ClientWithMiddleware`
|
||||
- A new `Extension` initialiser that adds extensions to the request
|
||||
- Adds `with_extension` method functionality to `RequestBuilder` that can add extensions for the `send` method to use - deprecating `send_with_extensions`.
|
||||
- A new `Extension` initialiser that adds extensions to each request
|
||||
- Adds `with_extension` method functionality to `RequestBuilder` that can add extensions for the `send` method to use.
|
||||
|
||||
## [0.1.6] - 2022-04-21
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "reqwest-middleware"
|
||||
version = "0.1.7-alpha.0"
|
||||
version = "0.2.0"
|
||||
authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"]
|
||||
edition = "2018"
|
||||
description = "Wrapper around reqwest to allow for client middleware chains."
|
||||
|
@ -13,7 +13,6 @@ readme = "../README.md"
|
|||
[dependencies]
|
||||
anyhow = "1"
|
||||
async-trait = "0.1.51"
|
||||
futures = "0.3"
|
||||
http = "0.2"
|
||||
reqwest = { version = "0.11", default-features = false, features = ["json", "multipart"] }
|
||||
serde = "1"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use futures::future::{BoxFuture, FutureExt, TryFutureExt};
|
||||
use reqwest::{Client, Request, Response};
|
||||
use std::sync::Arc;
|
||||
use task_local_extensions::Extensions;
|
||||
|
@ -76,6 +75,8 @@ pub struct Next<'a> {
|
|||
middlewares: &'a [Arc<dyn Middleware>],
|
||||
}
|
||||
|
||||
pub type BoxFuture<'a, T> = std::pin::Pin<Box<dyn std::future::Future<Output = T> + Send + 'a>>;
|
||||
|
||||
impl<'a> Next<'a> {
|
||||
pub(crate) fn new(client: &'a Client, middlewares: &'a [Arc<dyn Middleware>]) -> Self {
|
||||
Next {
|
||||
|
@ -91,9 +92,9 @@ impl<'a> Next<'a> {
|
|||
) -> BoxFuture<'a, Result<Response>> {
|
||||
if let Some((current, rest)) = self.middlewares.split_first() {
|
||||
self.middlewares = rest;
|
||||
current.handle(req, extensions, self).boxed()
|
||||
Box::pin(current.handle(req, extensions, self))
|
||||
} else {
|
||||
self.client.execute(req).map_err(Error::from).boxed()
|
||||
Box::pin(async move { self.client.execute(req).await.map_err(Error::from) })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.0] - 2022-11-15
|
||||
|
||||
### Changed
|
||||
- Updated `reqwest-middleware` to `0.2.0`
|
||||
|
||||
## [0.1.4] - 2022-02-21
|
||||
### Changed
|
||||
- Updated `reqwest-middleware` to `0.1.5`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "reqwest-retry"
|
||||
version = "0.1.6-alpha.0"
|
||||
version = "0.2.0"
|
||||
authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"]
|
||||
edition = "2018"
|
||||
description = "Retry middleware for reqwest."
|
||||
|
@ -10,7 +10,7 @@ keywords = ["reqwest", "http", "middleware", "retry"]
|
|||
categories = ["web-programming::http-client"]
|
||||
|
||||
[dependencies]
|
||||
reqwest-middleware = { version = "0.1.7-alpha.0", path = "../reqwest-middleware" }
|
||||
reqwest-middleware = { version = "0.2.0", path = "../reqwest-middleware" }
|
||||
|
||||
anyhow = "1"
|
||||
async-trait = "0.1.51"
|
||||
|
|
|
@ -5,11 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.4.0] - 2022-11-15
|
||||
|
||||
### Changed
|
||||
- Updated `reqwest-middleware` to `0.2.0`
|
||||
- Before, `root_span!`/`DefaultSpanBacked` would name your spans `{METHOD} {PATH}`. Since this can be quite
|
||||
high cardinality, this was changed and now the macro requires an explicit otel name.
|
||||
`DefaultSpanBacked`/`SpanBackendWithUrl` will default to `reqwest-http-client` but this can be configured
|
||||
using the `OtelName` Request Initialiser.
|
||||
|
||||
### Added
|
||||
- `SpanBackendWithUrl` for capturing `http.url` in traces
|
||||
- Require an explicit otel name in the macros. Reduces cardinality and complies
|
||||
with otel specification for HTTP bindings.
|
||||
- Permit customisation of the otel name from the non-macro layer.
|
||||
- `OtelName` Request Initialiser Extension for configuring
|
||||
|
||||
## [0.3.1] - 2022-09-21
|
||||
- Added support for `opentelemetry` version `0.18`.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "reqwest-tracing"
|
||||
version = "0.3.1-alpha.0"
|
||||
version = "0.4.0"
|
||||
authors = ["Rodrigo Gryzinski <rodrigo.gryzinski@truelayer.com>"]
|
||||
edition = "2018"
|
||||
description = "Opentracing middleware for reqwest."
|
||||
|
@ -19,12 +19,11 @@ opentelemetry_0_18 = ["opentelemetry_0_18_pkg", "tracing-opentelemetry_0_18_pkg"
|
|||
|
||||
|
||||
[dependencies]
|
||||
reqwest-middleware = { version = "0.1.7-alpha.0", path = "../reqwest-middleware" }
|
||||
reqwest-middleware = { version = "0.2.0", path = "../reqwest-middleware" }
|
||||
|
||||
async-trait = "0.1.51"
|
||||
reqwest = { version = "0.11", default-features = false }
|
||||
task-local-extensions = "0.1.1"
|
||||
tokio = { version = "1.6", features = ["time"] }
|
||||
tracing = "0.1.26"
|
||||
|
||||
opentelemetry_0_13_pkg = { package = "opentelemetry", version = "0.13", optional = true }
|
||||
|
|
Loading…
Reference in a new issue