1、用 HttpClient 为什么报错?报什么错?
2、直接用就行了吧
Dim pos As object
try
Dim req = System.Net.WebRequest.Create("http://127.0.0.1/test.htm?key=123")
req.Method = "get"
pos = req.GetResponse
Dim stm As System.IO.Stream = pos.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String = reader.ReadToEnd
pos.Close
stm.Close
reader.close
msgbox(str)
catch ex As System.Net.WebException
pos = ctype(ex.Response,System.Net.HttpWebResponse)
'Return "post错误"
End try