Skip to content

Instantly share code, notes, and snippets.

@oldtune
Created June 15, 2023 08:26
Show Gist options
  • Save oldtune/8eb0a5eb6cf3b24cc54b5899b09e5d60 to your computer and use it in GitHub Desktop.
Save oldtune/8eb0a5eb6cf3b24cc54b5899b09e5d60 to your computer and use it in GitHub Desktop.
crawler main.rs
#[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