3

I'm still fighting with programmatically logging in to one site, My code:

val h = new Http 
val req = url("http://www.smanager.pl/logowanie.php") << 
    Map("username" -> "MYUSERNAME", "password" -> "MYPASSWORD") 
val handler = req.POST >>> System.out print(h(handler)) 

Username and password are correct for sure in the script, but on system.out I see the html of the login form. It doesn't work. Any have idea how to deal with it?

Urist McDev
  • 498
  • 3
  • 14
daaatz
  • 394
  • 1
  • 2
  • 14
  • The page probably checks if you are already logged in with the help of cookies. Are you sure your http library supports them? – drexin Jun 22 '12 at 11:20
  • No Im not, i dont know dispatch good. Ive done smth like it in C# and webclient and it logged ok, but i want to code it in scala.. – daaatz Jun 22 '12 at 13:34

1 Answers1

1

Did you try to login, or at least to dump requests, using curl? Maybe you need to additionally specify authentication type, for example Digest

idonnie
  • 1,703
  • 12
  • 11