Skip to content

Commit 12af53d

Browse files
committed
Updated README
1 parent d4b6c80 commit 12af53d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ An XML-based request is determined by the value of the `Content-Type` header. If
3636
- `application/xml`
3737
- `application/rss+xml`
3838

39+
### Options
40+
3941
You can also pass in options:
4042

4143
``` js
@@ -44,23 +46,23 @@ app.use(bodyParser.xml(options));
4446

4547
The `options` object accepts any of the following keys:
4648

47-
### defaultCharset
49+
#### defaultCharset
4850

4951
Specify the default character set for the text content if the charset is not specified in the `Content-Type` header of the request. Defaults to `utf-8`.
5052

51-
### inflate
53+
#### inflate
5254

5355
When set to `true`, then deflated (compressed) bodies will be inflated; when `false`, deflated bodies are rejected. Defaults to `true`.
5456

55-
### limit
57+
#### limit
5658

5759
Controls the maximum request body size. 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](https://www.npmjs.com/package/bytes) library for parsing. Defaults to `'100kb'`.
5860

59-
### verify
61+
#### verify
6062

6163
The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
6264

63-
### xmlParseOptions
65+
#### xmlParseOptions
6466

6567
This option controls the behaviour of the XML parser. You can pass any option that is supported by the [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) library: [see here](https://github.com/Leonidas-from-XIV/node-xml2js#options) for a list of these options.
6668

0 commit comments

Comments
 (0)