-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
HTTP Basic Auth #184
Comments
It's right in the linked Node.js docs: https://nodejs.org/api/http.html#http_http_request_options_callback |
OK, now I see that the documentation says the |
This allows for usage of things such as basic auth, and other features that node's built-in url library support that `got` expects. I only tested this by installing node-geckodriver via ``` GECKODRIVER_CDNURL="https://${ght}@github.com/mozilla/geckodriver/releases/download" npm link ../node-geckodriver/ ``` and confirmed that it no longer threw the error present in the upstream issue sindresorhus/got#184 ``` Error: Basic authentication must be done with auth option │$: git co master at normalizeArguments (~/code/project/node_modules/got/index.js:215:10) ```
For anyone coming to this issue from Google, like me, you now have to set |
This allows for usage of things such as basic auth, and other features that node's built-in url library support that `got` expects. I only tested this by installing node-geckodriver via ``` GECKODRIVER_CDNURL="https://${ght}@github.com/mozilla/geckodriver/releases/download" npm link ../node-geckodriver/ ``` and confirmed that it no longer threw the error present in the upstream issue sindresorhus/got#184 ``` Error: Basic authentication must be done with auth option │$: git co master at normalizeArguments (~/code/project/node_modules/got/index.js:215:10) ```
Does
got
support HTTP basic auth? The code references anauth
option, but none seems to currently exist. Of course, I can manually base64 encode my authentication data and pass it in through theAuthorization
header, but I would expect an HTTP request library to do that for me.The text was updated successfully, but these errors were encountered: