Skip to content

Commit

Permalink
Fix http-request-builder example
Browse files Browse the repository at this point in the history
The previous change added the `<body>` html tag which conflicts with the identifiers used in this example
  • Loading branch information
lukechu10 committed May 16, 2022
1 parent 9d198d4 commit 88424bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/http-request-builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ async fn fetch_visits(id: &str) -> Result<Visits, reqwasm::Error> {
let url = format!("{}/{}/hits", API_BASE_URL, id);
let resp = Request::get(&url).send().await?;

let body = resp.json::<Visits>().await?;
Ok(body)
Ok(resp.json::<Visits>().await?)
}

#[component]
Expand Down

0 comments on commit 88424bb

Please sign in to comment.