我在Python中开发Rest服务。我这样从vb.net调用它:
Try
Dim url As String = String.Format("http://localhost:5000/myapp/{0}", Code)
Dim serviceRequest As WebClient = New WebClient()
Dim response As String = serviceRequest.DownloadString(New Uri(url))
Catch ex As Exception
Msgbox("Something is wrong")
Finally
MsgboxEHN("Done")
End Try
这很好用。我从localhost测试,我正确地调用了服务,我知道它什么时候结束。 是否可以从visual?
控制服务错误感谢。