Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ where
"Executing {} and returning authentication info",
endpoint.path()
);
let r: EndpointResult<()> = endpoint
// data: Option<T> - despite sample on the hashicorp site it is sometimes returned as data: null which works or data: {} which failes unless set to Value
let r: EndpointResult<serde_json::Value> = endpoint
.with_middleware(client.middle())
.exec(client.http())
.await
Expand Down
5 changes: 4 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ impl VaultClient {
/// Creates a new [VaultClient] using the given [VaultClientSettings].
#[instrument(skip(settings), err)]
pub fn new(settings: VaultClientSettings) -> Result<VaultClient, ClientError> {
#[cfg(not(feature = "rustls"))]
#[cfg(not(any(feature = "rustls", feature = "native-tls")))]
let mut http_client = reqwest::ClientBuilder::new();

#[cfg(feature = "native-tls")]
let mut http_client = reqwest::ClientBuilder::new().use_native_tls();

#[cfg(feature = "rustls")]
let mut http_client = reqwest::ClientBuilder::new().use_rustls_tls();

Expand Down