-
Notifications
You must be signed in to change notification settings - Fork 200
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
how to add basic auth #380
Comments
Actually I would like to add an |
Shouldn't you be able to just add a header? Such as:
|
Hi everyone. If basic authentication, can test like following code. const frisby = require('frisby');
it('auth test', function (done) {
frisby.get('https://user:passwd@httpbin.org/basic-auth/user/passwd')
.expect('status', 200)
.done(done);
}); or const frisby = require('frisby');
const url = require('url');
it('auth test(2)', function (done) {
// use Legacy URL API.
var myURL = url.parse('https://httpbin.org/basic-auth/user/passwd');
myURL.auth = 'user:passwd';
frisby.get(url.format(myURL))
.expect('status', 200)
.done(done);
}); |
i want to add basic auth for get and post requests. I assume globalSetup() createWithAction() will be the right place, but i have no idea how to parse the information correctly.
The text was updated successfully, but these errors were encountered: