feat: add ureq
This commit is contained in:
12
__network/ureq/src/main.rs
Normal file
12
__network/ureq/src/main.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
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(())
|
||||
}
|
||||
Reference in New Issue
Block a user