Link to home
Start Free TrialLog in
Avatar of Anubis2005
Anubis2005Flag for Vanuatu

asked on

XMLHttp request from within a console vb.net application

Hello All,

I'm currently developing a console application (in VB.NET) and I would like to know if it's possible to perform an action similar to the XMLHttp web request.

From this application, I occasionally have to obtain a value from a web server sending some variables and then retreiving the result as a string.  I believe this should be possible (almost eveything else is from .net) but I just can't seem to find the code.

Thanks
Anubis.
ASKER CERTIFIED SOLUTION
Avatar of dctuck
dctuck
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anubis2005

ASKER

Thank you very much for pointing me in the right direction.  Just to save a little time instead of wading through the mass amounts of documentation... if I just wanted to perform a 'GET' request, how would this be done?  Just changing 'POST' to 'GET' throws an error...
I've not tried this, but browsing through the documentation, it looks like you can use:

Dim wc As New System.Net.WebClient()
Dim myResponse As String = wc.DownloadString("http://localhost/PostTest.php")

MsgBox(myResponse)

Like I say, I've not tested it, so it might need some fiddling... let me know!
Hello,

Yes, that worked perfectly.

Thank you so much for your assistance.
Anubis.