问题描述
- VB.net 通过WebRequest 发送post请求 如何获取http响应
-
VB.net 通过WebRequest 发送post请求 如何获取http响应
解决方案
http://blog.csdn.net/skylen/article/details/7594868
https://msdn.microsoft.com/zh-cn/library/system.net.webrequest.getresponse(VS.80).aspx
' Create a new WebRequest Object to the mentioned URL.
Dim myWebRequest As WebRequest = WebRequest.Create("http://www.contoso.com")
Console.WriteLine(ControlChars.Cr + "The Timeout time of the request before setting is : {0} milliseconds", myWebRequest.Timeout)
' Set the 'Timeout' property in Milliseconds.
myWebRequest.Timeout = 10000
' Assign the response object of 'WebRequest' to a 'WebResponse' variable.
Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
解决方案二:
一样是 GetResponse()啊。
.net HttpWebRequest实现post提交 http://saber5d.blog.163.com/blog/static/12799877820098164610192/
时间: 2024-11-01 02:21:57