Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bodyparser's 'type' option as function #5

Closed
Equals182 opened this issue Dec 9, 2019 · 1 comment
Closed

Support bodyparser's 'type' option as function #5

Equals182 opened this issue Dec 9, 2019 · 1 comment

Comments

@Equals182
Copy link
Contributor

This module uses bodyparser.text() to parse body as text and passes options object to configure it.

As you can see here, bodyparser accepts options.type options as function, which allows user to control type matching precisely.

Unfortunately, in body-parser-xml there is a line where it check if passed options.type is not an array and convert it into array thus breaking default bodyparser.text()'s ability to use user's function, because that function checks if passed 'type' option is a function

@fiznool
Copy link
Owner

fiznool commented Mar 25, 2020

Fixed in v2.0.0

@fiznool fiznool closed this as completed Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants