fn main() {
    let mut args = std::env::args().skip(1);
    let host = args.next().unwrap_or_else(|| "example.com".to_string());
    let path = args.next().unwrap_or_else(|| "/".to_string());

    match dope_aws::http::get_unsigned(&host, &path) {
        Ok(resp) => {
            println!("HTTP {} — {} body bytes", resp.status, resp.body.len());
            for (k, v) in &resp.headers {
                println!("  {k}: {v}");
            }
            let preview: String = resp.body_str().chars().take(200).collect();
            println!("---\n{preview}");
        }
        Err(e) => {
            eprintln!("request failed: {e}");
            std::process::exit(1);
        }
    }
}
