12 lines
291 B
Rust
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(())
|
|
} |