Minor changes to simple example to get rid of warnings and error.

This commit is contained in:
robviren
2021-01-02 07:35:42 -06:00
committed by Martin Algesten
parent 1f0d84279a
commit 7ffaa8cf9a

View File

@@ -25,11 +25,14 @@ Version 2.0.0 was released recently and changed some APIs. See the [changelog] f
In its simplest form, ureq looks like this:
```rust
use ureq;
fn main() -> Result<(), ureq::Error> {
let body: String = ureq::get("http://example.com")
.set("Example-Header", "header value")
.call()?
.call()
.into_string()?;
println!("{:#?}",body);
Ok(())
}
```