diff --git a/README.md b/README.md index d7460af..8d6e38a 100644 --- a/README.md +++ b/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