Skip to content

Commit

Permalink
update wording from suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobhq committed Feb 21, 2025
1 parent 2dfa8b0 commit 639498a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/documentation/server-utilities/request.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The same syntax applies also for catch-all dynamic path (i.e. `[...userId]`).

### `body`

The `body` method provides a safe way to get and read the body content of an HTTP request.
The `body` method provides a safe way to read and parse the body of an HTTP request.

Here's an example of using the `body` method to retrieve data from a `POST` request.

Expand All @@ -103,3 +103,5 @@ async fn my_post_request(req: Request) -> impl IntoResponse {
let body: MyBody = req.body().unwrap();
}
```

> Keep in mind that specifying the type is essential, as the method relies on it to determine the appropriate body serialization.

0 comments on commit 639498a

Please sign in to comment.