I\'ve been through different tutorials and this website, but couldn\'t find a proper solution. On the other hand, I\'ve seen apps logging into websites and requesting further in
Assuming your httpclient
object is the same in both cases, and assuming the RESTRICTED_URL
is in the same domain as the LOGIN_URL
, then I would think what you have should work.
You might wish to use Wireshark or a proxy or something to examine the HTTP requests you are making, to see if the cookie is actually being attached to the request. It may be that the cookie is being attached, in which case there is something else wrong that is causing your second request to fail.