mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
20
node_modules/body-parser/README.md
generated
vendored
20
node_modules/body-parser/README.md
generated
vendored
@@ -44,8 +44,10 @@ var bodyParser = require('body-parser')
|
||||
```
|
||||
|
||||
The `bodyParser` object exposes various factories to create middlewares. All
|
||||
middlewares will populate the `req.body` property with the parsed body or
|
||||
provide an error to the callback. The various errors are described in the
|
||||
middlewares will populate the `req.body` property with the parsed body, or an
|
||||
empty object (`{}`) if there was no body to parse (or an error was returned).
|
||||
|
||||
The various errors returned by this module are described in the
|
||||
[errors section](#errors).
|
||||
|
||||
### bodyParser.json(options)
|
||||
@@ -91,9 +93,9 @@ The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a function or a string. If a string, `type` option
|
||||
is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
|
||||
library and this can be an extension name (like `json`), a mime type (like
|
||||
`application/json`), or a mime time with a wildcard (like `*/*` or `*/json`).
|
||||
`application/json`), or a mime type with a wildcard (like `*/*` or `*/json`).
|
||||
If a function, the `type` option is called as `fn(req)` and the request is
|
||||
parsed if it returns a truthy value. Defaults to `json`.
|
||||
parsed if it returns a truthy value. Defaults to `application/json`.
|
||||
|
||||
##### verify
|
||||
|
||||
@@ -133,7 +135,7 @@ The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a function or a string. If a string, `type` option
|
||||
is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
|
||||
library and this can be an extension name (like `bin`), a mime type (like
|
||||
`application/octet-stream`), or a mime time with a wildcard (like `*/*` or
|
||||
`application/octet-stream`), or a mime type with a wildcard (like `*/*` or
|
||||
`application/*`). If a function, the `type` option is called as `fn(req)`
|
||||
and the request is parsed if it returns a truthy value. Defaults to
|
||||
`application/octet-stream`.
|
||||
@@ -181,7 +183,7 @@ The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a function or a string. If a string, `type` option
|
||||
is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
|
||||
library and this can be an extension name (like `txt`), a mime type (like
|
||||
`text/plain`), or a mime time with a wildcard (like `*/*` or `text/*`).
|
||||
`text/plain`), or a mime type with a wildcard (like `*/*` or `text/*`).
|
||||
If a function, the `type` option is called as `fn(req)` and the request is
|
||||
parsed if it returns a truthy value. Defaults to `text/plain`.
|
||||
|
||||
@@ -244,10 +246,10 @@ The `type` option is used to determine what media type the middleware will
|
||||
parse. This option can be a function or a string. If a string, `type` option
|
||||
is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
|
||||
library and this can be an extension name (like `urlencoded`), a mime type (like
|
||||
`application/x-www-form-urlencoded`), or a mime time with a wildcard (like
|
||||
`application/x-www-form-urlencoded`), or a mime type with a wildcard (like
|
||||
`*/x-www-form-urlencoded`). If a function, the `type` option is called as
|
||||
`fn(req)` and the request is parsed if it returns a truthy value. Defaults
|
||||
to `urlencoded`.
|
||||
to `application/x-www-form-urlencoded`.
|
||||
|
||||
##### verify
|
||||
|
||||
@@ -287,7 +289,7 @@ set to `413`.
|
||||
### request size did not match content length
|
||||
|
||||
This error will occur when the request's length did not match the length from
|
||||
the `Content-Lentgh` header. This typically occurs when the requst is malformed,
|
||||
the `Content-Length` header. This typically occurs when the request is malformed,
|
||||
typically when the `Content-Length` header was calculated based on characters
|
||||
instead of bytes. The `status` property is set to `400`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user