WebRequest正在发送两次

时间:2017-10-22 11:35:44

标签: vb.net webrequest

我有一个基本的VB.net函数,它必须运行HTTP请求。不幸的是,URL被调用两次,这导致我的网络服务器出现500错误。有什么想法吗?

Request = WebRequest.Create("http://10.211.55.5:8088/api/?Value=Script1")
Dim Response As WebResponse = Request.GetResponse()
Dim dataStream As Stream = Response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Label3.Text = responseFromServer
reader.Close()
Response.Close()

谢谢!

0 个答案:

没有答案