Skip to content

Commit

Permalink
chore: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
0x676e67 committed Mar 3, 2025
1 parent 5eb8684 commit 7cc6b1e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/request_with_cookie_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let url = Url::parse("https://google.com/")?;

// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

// Create a cookie store
// Used to store cookies for specific multiple requests without using the client's cookie store
Expand Down
2 changes: 1 addition & 1 deletion examples/request_with_local_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async fn main() -> Result<(), rquest::Error> {
.init();

// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

let resp = client
.get("http://www.baidu.com")
Expand Down
2 changes: 1 addition & 1 deletion examples/request_with_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async fn main() -> Result<(), rquest::Error> {
.init();

// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

let resp = client
.get("https://tls.peet.ws/api/all")
Expand Down
2 changes: 1 addition & 1 deletion examples/request_with_redirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async fn main() -> Result<(), rquest::Error> {
.init();

// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

let resp = client
.get("http://google.com/")
Expand Down
2 changes: 1 addition & 1 deletion examples/request_with_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async fn main() -> Result<(), rquest::Error> {
.init();

// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

let resp = client
.get("http://google.com/")
Expand Down
2 changes: 1 addition & 1 deletion examples/set_cookie_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Arc;
#[tokio::main]
async fn main() -> Result<(), rquest::Error> {
// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

let url = "https://tls.peet.ws/api/all".parse().expect("Invalid url");

Expand Down
2 changes: 1 addition & 1 deletion examples/set_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use http::{header, HeaderValue};
#[tokio::main]
async fn main() -> Result<(), rquest::Error> {
// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

// Use the API you're already familiar with
let resp = client.get("https://tls.peet.ws/api/all").send().await?;
Expand Down
2 changes: 1 addition & 1 deletion examples/set_local_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::net::IpAddr;
#[tokio::main]
async fn main() -> Result<(), rquest::Error> {
// Build a client
let client = rquest::Client::builder().build()?;
let client = rquest::Client::new();

// Use the API you're already familiar with
let resp = client.get("https://api.ip.sb/ip").send().await?;
Expand Down

0 comments on commit 7cc6b1e

Please sign in to comment.