15
README.md
15
README.md
@@ -23,6 +23,21 @@ On Windows and macOS:
|
||||
|
||||
Reqwest uses [rust-native-tls](https://github.com/sfackler/rust-native-tls), which will use the operating system TLS framework if available, meaning Windows and macOS. On Linux, it will use OpenSSL 1.1.
|
||||
|
||||
## Example
|
||||
|
||||
Fetch json
|
||||
|
||||
```rust
|
||||
extern crate reqwest;
|
||||
#[macro_use] extern crate serde_json;
|
||||
|
||||
fn main() {
|
||||
let mut reqwest_responce = reqwest::get("https://jsonplaceholder.typicode.com/todos/1").unwrap();
|
||||
let jsonplaceholder: serde_json::Value = reqwest_responce.json().unwrap();
|
||||
println!("{:#?}", jsonplaceholder);
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
||||
Reference in New Issue
Block a user