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
Copy file name to clipboardexpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,12 @@ app.use(async ctx => {
48
48
49
49
## Options
50
50
51
-
***enableTypes**: parser will only parse when request type hits enableTypes, default is `['json', 'form']`.
51
+
***enableTypes**: parser will only parse when request type hits enableTypes, support `json/form/text/xml`, default is `['json', 'form']`.
52
52
***encoding**: requested encoding. Default is `utf-8` by `co-body`.
53
53
***formLimit**: limit of the `urlencoded` body. If the body ends up being larger than this limit, a 413 error code is returned. Default is `56kb`.
54
54
***jsonLimit**: limit of the `json` body. Default is `1mb`.
55
55
***textLimit**: limit of the `text` body. Default is `1mb`.
56
+
***xmlLimit**: limit of the `xml` body. Default is `1mb`.
56
57
***strict**: when set to true, JSON parser will only accept arrays and objects. Default is `true`. See [strict mode](https://github.com/cojs/co-body#options) in `co-body`. In strict mode, `ctx.request.body` will always be an object(or array), this avoid lots of type judging. But text body will always return string type.
57
58
***detectJSON**: custom json request detect function. Default is `null`.
0 commit comments