Skip to content

Commit b089c6e

Browse files
committed
chore(example): update examples
1 parent 7caa4ad commit b089c6e

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

examples/request_with_interface.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#[cfg(any(
22
target_os = "android",
33
target_os = "fuchsia",
4-
target_os = "linux",
4+
target_os = "illumos",
55
target_os = "ios",
6-
target_os = "visionos",
6+
target_os = "linux",
77
target_os = "macos",
8+
target_os = "solaris",
89
target_os = "tvos",
9-
target_os = "watchos"
10+
target_os = "visionos",
11+
target_os = "watchos",
1012
))]
1113
#[tokio::main]
1214
async fn main() -> wreq::Result<()> {
@@ -30,11 +32,13 @@ async fn main() -> wreq::Result<()> {
3032
#[cfg(not(any(
3133
target_os = "android",
3234
target_os = "fuchsia",
33-
target_os = "linux",
35+
target_os = "illumos",
3436
target_os = "ios",
35-
target_os = "visionos",
37+
target_os = "linux",
3638
target_os = "macos",
39+
target_os = "solaris",
3740
target_os = "tvos",
38-
target_os = "watchos"
41+
target_os = "visionos",
42+
target_os = "watchos",
3943
)))]
4044
fn main() {}

examples/request_with_version.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use http::Version;
2-
use wreq::redirect::Policy;
32

43
#[tokio::main]
54
async fn main() -> wreq::Result<()> {
@@ -9,7 +8,6 @@ async fn main() -> wreq::Result<()> {
98

109
let resp = wreq::Client::new()
1110
.get("https://tls.peet.ws/api/all")
12-
.redirect(Policy::default())
1311
.version(Version::HTTP_11)
1412
.send()
1513
.await?;

0 commit comments

Comments
 (0)