Skip to content

Commit

Permalink
docs: fix code sample for manual HTTP requests (#1122)
Browse files Browse the repository at this point in the history
#### Why are we making this change?

This is a very minor change but it might throw users who are less
familiar with reqwest for a loop

#### What effects does this change have?

The json member in reqwest's response is a function and needs to be
called, not accessed.
  • Loading branch information
mattsains authored Jan 9, 2025
1 parent 61cae06 commit d1c2359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cynic-book/src/manual-http-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let response = reqwest::blocking::Client::new()
.send()
.unwrap();

let all_films_result = response.json::<GraphQlResponse<AllFilmsQuery>>.unwrap();
let all_films_result = response.json::<GraphQlResponse<AllFilmsQuery>>().unwrap();
```

Now you can do whatever you want with the result.

0 comments on commit d1c2359

Please sign in to comment.