From de1b651bcc9f9b7acb83c40490587ca422b7791d Mon Sep 17 00:00:00 2001 From: Ari Date: Tue, 24 Oct 2023 11:39:06 +0200 Subject: [PATCH] add fetch_mode_no_cors_method (#108) * add fetch_mode_no_cors_method * Update changelog * Bump verion --- CHANGELOG.md | 5 +++++ reqwest-middleware/Cargo.toml | 2 +- reqwest-middleware/src/client.rs | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91bde50..a329be0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. 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). +### [0.2.4] - 2023-09-21 + +### Added +- Added `fetch_mode_no_cors` method to `reqwest_middleware::RequestBuilder` + ## [0.2.3] - 2023-08-07 ### Added diff --git a/reqwest-middleware/Cargo.toml b/reqwest-middleware/Cargo.toml index 75af5ef..2bcd347 100644 --- a/reqwest-middleware/Cargo.toml +++ b/reqwest-middleware/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reqwest-middleware" -version = "0.2.3" +version = "0.2.4" authors = ["Rodrigo Gryzinski "] edition = "2018" description = "Wrapper around reqwest to allow for client middleware chains." diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs index 8b714a7..8a48fad 100644 --- a/reqwest-middleware/src/client.rs +++ b/reqwest-middleware/src/client.rs @@ -282,6 +282,13 @@ impl RequestBuilder { } } + pub fn fetch_mode_no_cors(self) -> Self { + RequestBuilder { + inner: self.inner.fetch_mode_no_cors(), + ..self + } + } + pub fn build(self) -> reqwest::Result { self.inner.build() }