File: hello.rs

package info (click to toggle)
rust-minreq 2.13.4-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 408 kB
  • sloc: makefile: 2
file content (8 lines) | stat: -rw-r--r-- 249 bytes parent folder | download
1
2
3
4
5
6
7
8
//! This is a simple example to demonstrate the usage of this library.

fn main() -> Result<(), minreq::Error> {
    let response = minreq::get("http://example.com").send()?;
    let html = response.as_str()?;
    println!("{}", html);
    Ok(())
}