From 8c3ef407f74c1a9ab1f0928ab6260beb98e82897 Mon Sep 17 00:00:00 2001 From: Bennett Piater Date: Thu, 21 Mar 2024 13:38:45 +0100 Subject: [PATCH] Allow providing a custom reqwest client This allows e.g. custom certificate handling. --- src/access.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/access.rs b/src/access.rs index d3d7dc5..359e6ca 100644 --- a/src/access.rs +++ b/src/access.rs @@ -109,6 +109,13 @@ impl JiraInstance { self } + /// Set the http client of this `JiraInstance`. + #[must_use] + pub fn with_client(mut self, client: reqwest::Client) -> Self { + self.client = client; + self + } + /// Set the pagination method of this `JiraInstance`. #[must_use] pub const fn paginate(mut self, pagination: Pagination) -> Self {