-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
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
basic auth support #57
Comments
I wonder if this could be documented in the README like the oauth technique is (without adding code). Maybe something like: const user = 'someuser'
const pass = 'pa$$word'
const encodedAuth = Buffer.from(`${user}:${pass}`).toString('base64')
get('http://example.com', {
headers: {
'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)`,
authorization: `Basic ${encodedAuth}`
}
}) |
Did not see that at the time I posted this. Considering that's the approach for OAuth, the http auth should be like the one in @Flet 's example (included in the |
Thanks for the code snippet, @Flet. Just added it to the readme! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @feross would you be open to a pull request to support basic auth? I know there's already OAuth but basic auth is still used here and there.
The text was updated successfully, but these errors were encountered: