headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.49k stars 160 forks source link

How to make cookies stay there in the next request. #83

Open TuralAsgar opened 7 years ago

TuralAsgar commented 7 years ago

I am logging in to a site and when I go to a new page where only can be accessible to logged in users it says you are not logged in. It passes logging in form section I believe.

nikolal commented 6 years ago

I would also like to know if this is possible?

mbndr commented 6 years ago

For testing this library I wrote a small PHP app with a simple login working with sessions. That wasn't a problem and everything works just as I was visiting the page myself. In a project I logged into the customers software and it also worked perfectly fine when visiting another page where the user has to be logged in.

How are you visiting the next page? Do you send the form correctly and using the same Browser object?