HttpSocket - how to get response

I just started with xojo today, and it looks good.

I have this code in a desktop app that communicates with a http server :

 [code] Dim httpSock1 As New HTTPSocket 
  Dim data As New Dictionary
  data.value("txUserName") = txtLoginName.text
  data.value("txPassword") = txtPassword.text   

// Not sure what to do here : I need to get response from server
// to indicate success or failure[/code]

The above works fine in sending the data to server, and server receiving it and processing it. the server then sends a response
which I need to receive. Using Dart, I did the following to receive the response :

     httpReq.onLoadEnd.listen((evt) {httpReturnLogin(httpReq);});

An example would be great.

look in the examples folder for communication. i think it’s in there.

You can also read it on the wiki.
Listen is used for sockets that “keep listening”
Post can get a “result” in a subclass or if you drag and drop a httpsocket to your window.
Then you get the events you need.

Dim temp as String

temp = httpSock1.Post(“”,30) //30=timeout in seconds

Thanks Ashot. That worked.