This option can be a string, array of strings, or a function. This is used to determine what media type the middleware will parse. You can find more information on this argument in the MDN documentation about JSON.parse.Įnables or disables only accepting arrays and objects when disabled will accept anything JSON.parse accepts. The reviver option is passed directly to JSON.parse as the second argument. If this is a number, then the value specifies the number of bytes if it is a string, the value is passed to the bytes library for parsing. PropertyĮnables or disables handling deflated (compressed) bodies when disabled, deflated bodies are rejected.Ĭontrols the maximum request body size. The following table describes the properties of the optional options object. Values in this object are untrusted and should be validated before trusting.įor example, () may fail in multiple ways, for exampleįoo may not be there or may not be a string, and toString may not be aįunction and instead a string or other user-input. As req.body’s shape is based on user-controlled input, all properties and
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |