basic auth not working in Node 8.x
See original GitHub issueThis code works in Node 7.x:
const req = require("http").request({
auth: "user:pass",
hostname: "temp",
method: "GET",
path: "/auth/index.html"
});
req.once("response", function(response) {
console.log(response)
response.on("data", () => {});
response.once("end", () => done());
})
.on("error", error => console.log(error));
req.end();
In 8.x, it logs this:
{ Error: Nock: No match for request {
"method": "GET",
"url": "http://temp/auth/index.html"
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Basic HTTP authentication with Node and Express 4
Version 4 (I'm using 4.2) removed the basicAuth middleware, though, so I'm a little stuck. I have the following code, but it doesn't...
Read more >NodeJS - Basic Authentication Tutorial with Example API
Run the Node Basic Authentication API Locally Install Node. js and npm from https://nodejs.org. Install all required npm packages by running ...
Read more >Basic Authentication in Node.js using HTTP Header
Open any browser with http://localhost:3000 location in a private window(in order to avoid a saved password and username). A pop will occur near ......
Read more >RFC 7617: The 'Basic' HTTP Authentication Scheme
This document updates the definition, and also addresses internationalization issues by introducing the 'charset' authentication parameter (Section 2.1).
Read more >How to set Basic Authentication in Postman for REST call
Here the modem might interpret it as a reset command and will reset itself. In order to avoid such problems, it is beneficial...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should be fixed in 9.0.14. Please reopen if issue persists.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!