intuit / oauth-jsclient

Intuit's NodeJS OAuth client provides a set of methods to make it easier to work with OAuth2.0 and Open ID
https://developer.intuit.com/
Apache License 2.0
121 stars 156 forks source link

Fix: handle not JSON content in response parsing #59

Closed sebastien-cleany closed 4 years ago

sebastien-cleany commented 4 years ago

Some intuit API as invoice download return not JSON content (PDF in this case). makeApiCall wasn't working with it because of mandatory response body parsing.

So if the response is not JSON, we don't want to parse the body. And simply let the caller decide what to do with it.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.03%) to 91.423% when pulling 99fb4949e0c34989ddeff6fb7795e9ca2105c716 on cleany:develop into f84fb3f78d17a1a1675442a2f3d3116cea746d60 on intuit:develop.

abisalehalliprasan commented 4 years ago

Thanks for the PR 👏 . Will take a look at it and plan to have this for the next release.