Skip to content

Commit 78c0bdc

Browse files
authored
Update explicit-body.md
Updated grammar
1 parent 605970e commit 78c0bdc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/concept/explicit-body.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ app.post('/', ({ body }) => body, {
3131
})
3232
```
3333

34-
Elysia read the body schema and found that, the type is entirely an object, so it's likely that the body will be JSON, Elysia then pick the JSON body parser function ahead of time and try to parse the body.
34+
Elysia read the body schema and found that, the type is entirely an object, so it's likely that the body will be JSON. Elysia then picks the JSON body parser function ahead of time and tries to parse the body.
3535

36-
Here's a criteria that Elysia use to pick up type of body parser
36+
Here's a criteria that Elysia uses to pick up type of body parser
3737

3838
- `application/json`: body typed as `t.Object`
3939
- `multipart/form-data`: body typed as `t.Object`, and is 1 level deep with `t.File`
@@ -43,7 +43,7 @@ Here's a criteria that Elysia use to pick up type of body parser
4343
This allows Elysia to optimize body parser ahead of time, and reduce overhead in compile time.
4444

4545
## Explicit Content Type
46-
However, is some scenario that Elysia fail to pick the correct body parser function, you can explicitly tell Elysia to use a certain function by specifying `type`
46+
However, in some scenario if Elysia fails to pick the correct body parser function, you can explicitly tell Elysia to use a certain function by specifying `type`
4747

4848
```ts
4949
app.post('/', ({ body }) => body, {
@@ -52,7 +52,7 @@ app.post('/', ({ body }) => body, {
5252
})
5353
```
5454

55-
This allows you to control Elysia behavior for picking body parser function to fits your need in complex scenario.
55+
This allows you to control Elysia behavior for picking body parser function to fit your needs in a complex scenario.
5656

5757
`type` may be one of the following:
5858
```ts
@@ -71,4 +71,4 @@ type ContentType = |
7171
| 'application/x-www-form-urlencoded'
7272
```
7373
74-
You can extends Elysia by adding a custom body parser function yourself with `onParse`, see [body parser](/patterns/body-parser).
74+
You can extend Elysia by adding a custom body parser function yourself with `onParse`, see [body parser](/patterns/body-parser).

0 commit comments

Comments
 (0)