-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Response URL #1467
Comments
12 tasks
You can access the current URL via Edit: Clientside you may have to access |
With supertest you can access to response location with For exemple with mocha + supertest : const request = require('supertest');
it('Should redirect to the login page', async() => {
const res = await request(app).get('/Dashboard');
res.header.location.should.equals('/Dashboard/login');
}); |
here is my solution const response = await request.get('http://foo.com');
const url = response.redirects.pop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wasn't able to find how to get response URL: http://visionmedia.github.io/superagent/#response-properties. The use case is simple - I have a starting URL and I don't know the response URL, because of following redirects. Is this possible?
The text was updated successfully, but these errors were encountered: