Skip to content

Commit e5cf33d

Browse files
authored
Use reqwest/native-tls by default (Azure#2096)
* Use reqwest/native-tls by default * Roll back upgrades, fix wasm32 build
1 parent 04a7d2c commit e5cf33d

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

Cargo.lock

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/typespec/typespec_client_core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ default = ["http", "json", "reqwest", "reqwest_gzip"]
5050
derive = ["dep:typespec_macros"]
5151
http = ["dep:http-types", "typespec/http"]
5252
json = ["typespec/json"]
53-
reqwest = ["dep:reqwest"]
53+
reqwest = ["reqwest/native-tls"]
5454
reqwest_gzip = ["reqwest/gzip"]
5555
reqwest_rustls = ["reqwest/rustls-tls-native-roots"]
5656
tokio_fs = ["tokio/fs", "tokio/sync", "tokio/io-util"]

sdk/typespec/typespec_client_core/examples/stream_response.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use futures::StreamExt;
55
use tracing::level_filters::LevelFilter;
66
use tracing_subscriber::fmt::format::FmtSpan;
77

8-
#[tokio::main]
8+
#[cfg_attr(not(target_arch = "wasm32"), tokio::main)]
9+
#[cfg_attr(target_arch = "wasm32", tokio::main(flavor = "current_thread"))]
910
async fn main() -> Result<(), Box<dyn std::error::Error>> {
1011
// Log traces to stdout.
1112
tracing_subscriber::fmt()

sdk/typespec/typespec_client_core/src/http/request/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ impl From<Box<dyn SeekableStream>> for Body {
8585
#[cfg(test)]
8686
impl PartialEq for Body {
8787
fn eq(&self, other: &Self) -> bool {
88+
#[cfg_attr(target_arch = "wasm32", allow(irrefutable_let_patterns))]
8889
if let Self::Bytes(this) = self {
8990
if let Self::Bytes(other) = other {
9091
return this.eq(other);

0 commit comments

Comments
 (0)