Add optional native-tls support, clear up warnings for flag configurations

This commit is contained in:
k3d3
2020-04-13 22:03:53 -04:00
committed by Martin Algesten
parent 8a05241eac
commit 9f7f712dde
8 changed files with 65 additions and 15 deletions

View File

@@ -7,6 +7,7 @@
//! * Obvious API
//!
//! ```
//! # #[cfg(feature = "json")] {
//! // requires feature: `ureq = { version = "*", features = ["json"] }`
//! # #[cfg(feature = "json")] {
//! use ureq::json;
@@ -195,7 +196,7 @@ mod tests {
}
#[test]
#[cfg(feature = "tls")]
#[cfg(any(feature = "tls", feature = "native-tls"))]
fn connect_https_google() {
let resp = get("https://www.google.com/").call();
assert_eq!(
@@ -206,7 +207,7 @@ mod tests {
}
#[test]
#[cfg(feature = "tls")]
#[cfg(any(feature = "tls", feature = "native-tls"))]
fn connect_https_invalid_name() {
let resp = get("https://example.com{REQUEST_URI}/").call();
assert_eq!(400, resp.status());