Tools for http get
HttpGet
01 Syntax
Microsoft.VisualBasic.HttpGet
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| GET | 1 | Get the html page content from a website request or a html file on the local filesystem. |
| UrlGet | 1 | Perform a web url query request |
| BuildWebRequest | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| HttpRequestTimeOut | 1 | Request timeout unit in seconds. |
04 Members
GET(
String, UInt16, Dictionary(Of String, String), String, Boolean, String, String, Boolean, Boolean, Int64)Get the html page content from a website request or a html file on the local filesystem. (同时支持http位置或者本地文件,失败或者错误会返回空字符串)
Remarks
这个工具只适合于文本数据的传输操作
Parameters
| Name | Type | Description |
|---|---|---|
url | String | web http request url or a file path handle |
retry | UInt16 | 发生错误的时候的重试的次数 |
timeoutSec | Dictionary(Of String, String) | 设置请求超时的时间长度,单位为秒 |
Returns
失败或者错误会返回空字符串
UrlGet(
HttpRequestMessage, Boolean, TimeSpan)Perform a web url query request
Parameters
| Name | Type | Description |
|---|---|---|
webrequest | HttpRequestMessage | - |
HttpRequestTimeOut
Request timeout unit in seconds.
BuildWebRequest(
String, Dictionary(Of String, String), String, String, Boolean, Int64)