Created
June 15, 2023 08:26
-
-
Save oldtune/8eb0a5eb6cf3b24cc54b5899b09e5d60 to your computer and use it in GitHub Desktop.
crawler main.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[tokio::main] | |
async fn main() -> anyhow::Result<()> { | |
let http_client = build_http_client()?; | |
// Note that the code is incomplete here | |
Ok(()) | |
} | |
fn build_http_client() -> reqwest::Result<reqwest::Client> { | |
let client_builder = reqwest::ClientBuilder::new().gzip(true); | |
let client = client_builder.build(); | |
client | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment