Skip to content

Commit 5de9813

Browse files
committed
Update reqwest
This patch updates to reqwest 0.13 and adjusts how features are enabled now that rustls is the default TLS provider.
1 parent e16a4bb commit 5de9813

File tree

6 files changed

+35
-31
lines changed

6 files changed

+35
-31
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@ jobs:
66
check:
77
name: test
88
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
runtime: ["blocking", "default"]
12-
tls: ["native-tls", "rustls"]
13-
149
steps:
1510
- name: Checkout sources
16-
uses: actions/checkout@v3
11+
uses: actions/checkout@v6
1712

1813
- name: Install stable toolchain
1914
uses: dtolnay/rust-toolchain@stable
@@ -22,10 +17,16 @@ jobs:
2217
run: cargo fmt --all -- --check
2318

2419
- name: Check clippy
25-
run: cargo clippy --features ${{ matrix.runtime }},${{ matrix.tls }} -- -D warnings
20+
run: cargo clippy -- -D warnings
2621

27-
- name: Test with ${{ matrix.runtime }} and ${{ matrix.tls }}
28-
run: cargo test --features ${{ matrix.runtime }},${{ matrix.tls }}
29-
30-
- name: Async test
22+
- name: Test async and rustls
3123
run: cargo test
24+
25+
- name: Test async and native-tls
26+
run: cargo test --features native-tls
27+
28+
- name: Test blocking and rustls
29+
run: cargo test --features blocking
30+
31+
- name: Test blocking and native-tls
32+
run: cargo test --features blocking,native-tls

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.26.0 - 2026-01-17
4+
5+
### Changed
6+
7+
- The rustls feature is removed.
8+
- `reqwest` was updated to 0.13.
9+
- `date-encoding` was updated to 2.10.
10+
311
## 0.25.0 - 2026-01-10
412

513
### Changed

Cargo.toml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sendgrid"
3-
version = "0.25.0"
3+
version = "0.26.0"
44
edition = "2024"
55
authors = ["Garrett Squire <github@garrettsquire.com>"]
66
description = "An unofficial client library for the SendGrid API"
@@ -12,22 +12,19 @@ documentation = "https://docs.rs/sendgrid"
1212
readme = "README.md"
1313

1414
[dependencies]
15-
data-encoding = "2.9"
16-
reqwest = { version = "0.12", default-features = false, features = ["json"] }
15+
data-encoding = "2.10"
16+
reqwest = { version = "0.13", default-features = false, features = ["json"] }
1717
serde = { version = "1.0", features = ["derive"] }
1818
serde_json = "1.0"
1919
thiserror = "2.0"
2020
url = "2.5"
2121

2222
[dev-dependencies]
23-
tokio = { version = "1.0", features = ["full"] }
23+
tokio = { version = "1", features = ["full"] }
2424

2525
[features]
26-
default = ["native-tls"]
27-
2826
blocking = ["reqwest/blocking"]
29-
rustls = ["reqwest/rustls-tls"]
30-
native-tls = ["reqwest/default-tls"]
27+
native-tls = ["reqwest/native-tls"]
3128

3229
[[example]]
3330
name = "v3_async"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ sendgrid = "X.X.X"
1919
```
2020

2121
## Build Dependencies
22-
This library utilises [reqwest](https://crates.io/crates/reqwest). Follow the instructions on the
22+
This library utilizes [reqwest](https://crates.io/crates/reqwest). Follow the instructions on the
2323
[reqwest README](https://github.com/seanmonstar/reqwest#requirements) in order to enable sending HTTPS
2424
requests to the SendGrid API.
2525

2626
## Features
2727
You can take advantage of a couple features for the crate. To enable the blocking send function, you
28-
can use the `blocking` flag. To enable the [rustls](https://github.com/rustls/rustls) TLS feature,
29-
use the `rustls` flag.
28+
can use the `blocking` flag. To use your operating system's [TLS implementation](https://github.com/sfackler/rust-native-tls),
29+
enable the `native-tls` feature.
3030

3131
## Example
3232
An example of using this library can be found in the examples directory. This example code expects to

src/client.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ impl SGClient {
8080
/// RustTLS backend, this can never panic because RustTLS is statically linked.
8181
pub fn new<S: Into<String>>(key: S) -> SGClient {
8282
let async_builder = reqwest::ClientBuilder::new();
83-
#[cfg(feature = "rustls")]
84-
let async_builder = async_builder.use_rustls_tls();
83+
#[cfg(feature = "native-tls")]
84+
let async_builder = async_builder.tls_backend_native();
8585
let client = async_builder.build().unwrap();
8686

8787
#[cfg(feature = "blocking")]
@@ -90,8 +90,8 @@ impl SGClient {
9090
#[cfg(feature = "blocking")]
9191
{
9292
let blocking_builder = reqwest::blocking::ClientBuilder::new();
93-
#[cfg(feature = "rustls")]
94-
let blocking_builder = blocking_builder.use_rustls_tls();
93+
#[cfg(feature = "native-tls")]
94+
let blocking_builder = blocking_builder.tls_backend_native();
9595
blocking_client = blocking_builder.build().unwrap();
9696
}
9797

src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
//!
2121
//! # Features
2222
//! The projects has the following feature flags:
23-
//! * `rustls`: this feature flag switches the default SSL provider in the operating system (usually
24-
//! OpenSSL) with RusTLS, which is a TLS implementation in Rust.
25-
//! * `native-tls`: enabled by default, this feature flag enabled the default SSL provider in the
26-
//! operating system (usually OpenSSL).
23+
//! * `native-tls`: disabled by default, this feature flag enables the default SSL provider in the
24+
//! operating system.
2725
//! * `blocking`: this feature flag allows you to construct a synchronous `SGClient`.
2826
//!
2927
//! ## Build Dependencies
30-
//! This library utilises [reqwest](https://crates.io/crates/reqwest). Follow the instructions on
28+
//! This library utilizes [reqwest](https://crates.io/crates/reqwest). Follow the instructions on
3129
//! the [reqwest README](https://github.com/seanmonstar/reqwest#requirements) in order to enable
3230
//! sending HTTPS requests to the SendGrid API.
3331
//!

0 commit comments

Comments
 (0)