Forum: Ruby post_form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fox (Guest)
on 2006-02-14 16:13
(Received via mailing list)
Hi,

I'm trying to do auto login and mail checker script to check my webmail
account http://webmail.razdva.cz/index.html. So I used post_form method
for logging.

res = Net::HTTP.post_form
URI.parse('http://webmail.razdva.cz/index.html'),
                 { "mode" => "login", "username"=>"user",
"password"=>"pwd", "secure" => "0" }

This call succeeds and res is HTTPFound, so I tried to download
redirected page, but the server immediatelly logouts me. I think that
problem is in cookies, becuase they are required by the server.
Should I start some session prior to posting a form?

Thanks a lot,
Fox
David V. (Guest)
on 2006-02-14 22:44
(Received via mailing list)
DÅ?a Utorok 14 Február 2006 13:33 Fox napísal:
>
> This call succeeds and res is HTTPFound, so I tried to download
> redirected page, but the server immediatelly logouts me. I think that
> problem is in cookies, becuase they are required by the server.
> Should I start some session prior to posting a form?
>
> Thanks a lot,
> Fox

Sessions are mostly stored server-side, so you need to re-send the
cookies the
server gives you back with each subsequent request.

Personally, I'd just use a Real Mail Account that lets you use POP.

David V.
This topic is locked and can not be replied to.