Files
simple-rust-tests/__network/ureq/src/main.rs
2022-05-14 01:29:43 +08:00

12 lines
291 B
Rust

use rust_util::XResult;
// https://github.com/algesten/ureq
fn main() -> XResult<()> {
let body: String = ureq::get("http://hatter.ink/ip/ip.jsonp")
// .set("Example-Header", "header value")
.call()?
.into_string()?;
println!("Body: {}", body);
Ok(())
}