extern crate reqwest;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::blocking::Client::builder()
.redirect(reqwest::redirect::Policy::none())
.build()
.unwrap();
let res = client.get("http://example.com")
.send()?
.text()?;
println!("{}", res);
Ok(())
}
This also works in Safari and Firefox.
Warning: the copied command may contain cookies or other sensitive data. Be careful if you're sharing the command with other people, sending someone your cookie for a website is like sending them your password.
This also works in Chrome and Firefox.
Warning: the copied command may contain cookies or other sensitive data. Be careful if you're sharing the command with other people, sending someone your cookie for a website is like sending them your password.
This also works in Chrome and Safari.
Warning: the copied command may contain cookies or other sensitive data. Be careful if you're sharing the command with other people, sending someone your cookie for a website is like sending them your password.