0

我正在尝试将参数附加到 URL ...这是代码

 Function SendingRequest(item as String) As String

    Dim URL As String
    URL = String.Format("http://localhost/SomeService/Type?id={0}", item)
    WebRequest.Create(URL)
    Dim dataStream As Stream = response.GetResponseStream()
            Dim reader As New StreamReader(dataStream)
            Dim responseFromServer As String = reader.ReadToEnd()
            Return responseFromServer
            reader.Close()
            response.Close()
  End Function

这没有返回响应...当我通过硬编码的 URL 时,如 WebRequest.Create("http://localhost/SomeService/Type?id=ABC") 我能够得到响应...什么可能是附加参数的问题????

4

0 回答 0