You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
35
35
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
37
37
38
38
-`application/json`: body typed as `t.Object`
39
39
-`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
43
43
This allows Elysia to optimize body parser ahead of time, and reduce overhead in compile time.
44
44
45
45
## 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`
0 commit comments