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

Does this library support any HTTP methods for API calls other than GET? #40

Closed brycejech closed 4 years ago

brycejech commented 4 years ago

Reading through the client code, it doesn't appear as though any of the other HTTP methods such as PUT, POST, or DELETE are supported. Unless I'm reading something wrong it looks like this only supports the token handling and GET requests for API calls.

If that is the case are there any plans to support other HTTP methods with body contents or am I better off using a third-party lib or rolling something myself?

Thanks!

abisalehalliprasan commented 4 years ago

@brycejech : The oauth-jsclient was initially created for token generation purposes and rightfully so we did not support other HTTP methods. The GET method was used to make sure the access/refresh token works with the CompanyInfo endpoint.

But I hear your point. The fix should be easy. Let me provide support for PUT,POST,DELETE for now. However kindly be advised that it would not be a full-blown SDK to support V3 API calls but you can still use it support the above-mentioned HTTP methods.

Thanks @brycejech

brycejech commented 4 years ago

Awesome, thanks!!

I see you guys have some issues tagged Hacktoberfest already. Mind if I take a stab at this one and send you a PR instead? On Oct 7, 2019, 4:45 PM -0500, abisalehalliprasan notifications@github.com, wrote:

@brycejech : The oauth-jsclient was initially created for token generation purposes and rightfully so we did not support other HTTP methods. The GET method was used to make sure the access/refresh token works with the CompanyInfo endpoint. But I hear your point. The fix should be easy. Let me provide support for PUT,POST,DELETE for now. However kindly be advised that it would not be a full-blown SDK to support V3 API calls but you can still use it support the above-mentioned HTTP methods. Thanks @brycejech — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

abisalehalliprasan commented 4 years ago

@brycejech : Sure. Go for it. I'd assign you on this one. Kindly send a PR to the develop branch.