From 639498aab2d4742805c9ea37edfd08f00dfb4cfb Mon Sep 17 00:00:00 2001 From: Jacob Marshall Date: Fri, 21 Feb 2025 10:27:32 +0000 Subject: [PATCH] update wording from suggestions --- src/routes/documentation/server-utilities/request.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/documentation/server-utilities/request.mdx b/src/routes/documentation/server-utilities/request.mdx index 8e0ff31..7f801fa 100644 --- a/src/routes/documentation/server-utilities/request.mdx +++ b/src/routes/documentation/server-utilities/request.mdx @@ -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. @@ -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.