view src/main.rs @ 0:44ae9c7bb872

Initial commit
author Lewin Bormann <lbo@spheniscida.de>
date Fri, 20 Mar 2020 19:00:35 +0100
parents
children 5b14b84fc45c
line wrap: on
line source

mod http;

use std::io;
use hyper;
use hyper_rustls;

use tokio::prelude::*;

async fn test_fetch_page() -> hyper::Result<()> {
    println!("testing!");
    let mut cl = http::HTTPS::new();
    let res = cl.get("https://audiophil-foto.de/de/shop/kameras/sony/".parse::<hyper::Uri>().unwrap()).await.unwrap();
    println!("{}\n{}", res.status, http::bytes_to_str(res.body).unwrap());

    Ok(())
}

#[tokio::main]
async fn main() {
    test_fetch_page().await.unwrap();
}