Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow optional headers to the requests
The above change allows an extra "headers" config options. This is necessery for example for the FreeAgent API that requires a User-Agent header You can then use it like this: var oauth2 = require('simple-oauth2')({ clientID: 'SOMEID', clientSecret: 'SOMESECRET', site: exports.'SOMEURI', tokenPath: '/token_endpoint', authorizationPath: '/approve_app', headers: {'User-Agent' : 'require'} }); Note: ReadMe should reflect this
- Loading branch information