Skip to content

updated http to accept any content header that includes xml - #1

Open
edencorbin wants to merge 2 commits into
sails101:masterfrom
edencorbin:master
Open

updated http to accept any content header that includes xml#1
edencorbin wants to merge 2 commits into
sails101:masterfrom
edencorbin:master

Conversation

@edencorbin

Copy link
Copy Markdown

Firstly thanks for the helpful repo, it works well. In the case I was working with I had to change the original: req.headers['content-type'] == 'application/xml' as what was sent from recurly (a billing service) was 'application/xml; charset=utf-8', to make this generic I'm recommending updating it to: var cType =req.headers['content-type']; if (cType.indexOf('xml')>-1) { which seems to work well from some quick testing. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant