We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In getBodyContent function can be found the snippet
req.on('end', function() { if(bodyStr.match(/^\S+=\S+&?/)) { cb(qs.parse(bodyStr)); } else { try { return cb(JSON.parse(bodyStr)) } catch (ex) { return cb(bodyStr); } } });
I think this snippet can be improved by parsing the bodyStr in dependence of http header content-type. For example
content-type
application/x-www-form-urlencoded
application/json
The text was updated successfully, but these errors were encountered:
I like this, I'll take care of it, thanks for the suggestion!
Sorry, something went wrong.
deleteman
No branches or pull requests
In getBodyContent function can be found the snippet
I think this snippet can be improved by parsing the bodyStr in dependence of http header
content-type
. For exampleapplication/x-www-form-urlencoded
- for querystringapplication/json
- for jsonThe text was updated successfully, but these errors were encountered: