Hi
I've been trying to login to a website using a POST request.
I send a request containing my username and password to the a URL used to login to the website, and I believe I'm logged in fine.
The problem comes when trying to store the cookie which is returned.
After I'm logged in the website automatically redirects me back to the homepage.
This means when I try and use response.Headers to get the cookie, I get the headers from the page it redirects me to. (I need the cookie returned from the login page)
Is there any way of stopping it from redirecting me/ storing the cookie before it redirects?
Thanks for your help
I've been trying to login to a website using a POST request.
I send a request containing my username and password to the a URL used to login to the website, and I believe I'm logged in fine.
The problem comes when trying to store the cookie which is returned.
After I'm logged in the website automatically redirects me back to the homepage.
This means when I try and use response.Headers to get the cookie, I get the headers from the page it redirects me to. (I need the cookie returned from the login page)
Is there any way of stopping it from redirecting me/ storing the cookie before it redirects?
Thanks for your help