Skip to content

Commit

Permalink
Update ContentTypeParser.md (#3273)
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarv committed Aug 20, 2021
1 parent a70ed11 commit 9cdc897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/ContentTypeParser.md
Expand Up @@ -85,7 +85,7 @@ fastify.addContentTypeParser('text/xml', function (request, payload, done) {
})

// Removes the both built-in content type parsers so that only the content type parser for text/html is available
fastiy.removeContentTypeParser(['application/json', 'text/plain'])
fastify.removeContentTypeParser(['application/json', 'text/plain'])
```

#### removeAllContentTypeParsers
Expand All @@ -97,7 +97,7 @@ Just like `removeContentTypeParser`, this API supports encapsulation. The API is
[catch-all content type parser](#Catch-All) that should be executed for every content type and the built-in parsers should be ignored as well.

```js
fastiy.removeAllContentTypeParsers()
fastify.removeAllContentTypeParsers()

fastify.addContentTypeParser('text/xml', function (request, payload, done) {
xmlParser(payload, function (err, body) {
Expand Down

0 comments on commit 9cdc897

Please sign in to comment.