HTTPSocket to read a webpage in console apps


I want to create a console application which communicates with a web service.

I tried to add a httpsocket as class in the app and also I tried to create an httpsocket inside a method and used AddHandler to handle PageReceived event in another method. But both does not work.

How can I read the page content of httpsocket in a console app?

Best regards


Poll the socket until it finishes.

thanks a lot. I used synchronously get now (string = httpsocket.get(“url”,timeout)

Fabian could you post example code ?

dim h as new httpsocket
dim someVar as string = h.get(“url”,timeout)