Skip to content

Commit

Permalink
Document disabling body parsing middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Apr 3, 2019
1 parent 43417e2 commit 8e429e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -53,6 +53,8 @@ The following `Content-Type` headers will be parsed and exposed via `req.body`:
- URL-encoded form (`application/x-www-form-urlencoded`)
- Buffer (`application/octet-stream`)

You can change body parsing behaviour with the [`bodyParser`](#optionsbodyparser) option.

`createTestServer()` has a Promise based API that pairs well with a modern asynchronous test runner such as [AVA](https://github.com/avajs/ava).

You can create a separate server per test:
Expand Down Expand Up @@ -166,10 +168,12 @@ SSL certificate options to be passed to [`createCert()`](https://github.com/luke

##### options.bodyParser

Type: `object`
Type: `object | boolean`
Default: `undefined`

Body parser options to be passed to [`body-parser`](https://github.com/expressjs/body-parser) methods.
Body parser options object to be passed to [`body-parser`](https://github.com/expressjs/body-parser) methods.

If set to `false` then all body parsing middleware will be disabled.

### server

Expand Down

0 comments on commit 8e429e2

Please sign in to comment.