HTTPSecureSocket.get closing connection

Hello,

The API that I trie to access has a complicated login system:

  • I must send a get command “user/init” and it returns a value called nonce and a session id.
  • The nonce value can not be reused.
  • Then I have to generate a token build by SHA1(nonce + SHA1(password))
  • Next I login by a get command “userlogin?user=xxx&token=yyy”

My login is always refused and the session id and nonce returned are different from the one I used to calculate the token. I think that the problem is that the socket closes the connection after each get command and reconnects at the next get command so that I will be in different sessions.

Is there a way to tell the socket to stay connected all the time ?
Any other ideas ?

Best regards,
Pascal

I think the new Xojo.Net.HTTPSocket class supports persistent connections. Other than that you’d have to look into using something like libcurl.