What is the best way to issue a http get in VB.net? I want to get the result of a request like http://api.hostip.info/?ip=68.180.206.184
Use the WebRequest class
This is to get an image:
Try
Dim _WebRequest As System.Net.WebRequest = Nothing
_WebRequest = System.Net.WebRequest.Create(http://api.hostip.info/?ip=68.180.206.184)
Catch ex As Exception
Windows.Forms.MessageBox.Show(ex.Message)
Exit Sub
End Try
Try
_NormalImage = Image.FromStream(_WebRequest.GetResponse().GetResponseStream())
Catch ex As Exception
Windows.Forms.MessageBox.Show(ex.Message)
Exit Sub
End Try