Method | Description | |
---|---|---|
ConvertToCookieContainer ( string>.Dictionary |
convert cookies string to CookieContainer
|
|
CreateGetHttpResponse ( string url, int timeout = 8000, string userAgent = null, |
创建GET方式的HTTP请求
|
|
CreatePostHttpResponse ( string url, string postData, int timeout = 8000, string userAgent = null, |
创建POST方式的HTTP请求
|
|
GetAllCookies ( |
Get all cookies from CookieContainer.
|
|
GetHttpContent ( string url, string postData = null, |
获取网页的内容
|
|
HttpRequest ( string url, string postData = null, |
使用Http Request获取网页信息
|
Method | Description | |
---|---|---|
CheckValidationResult ( object sender, |
验证证书
|
|
DetermineResultStatus ( |
根据异常内容判断状态类型
|
|
SetCookie ( |
根据response中头部的set-cookie对request中的cookie进行设置
|
public static ConvertToCookieContainer ( string>.Dictionary |
||
cookies | string>.Dictionary | cookies dictionary. |
return |
public static CreateGetHttpResponse ( string url, int timeout = 8000, string userAgent = null, |
||
url | string | |
timeout | int | |
userAgent | string | |
cookies | ||
referer | string | |
proxy | IWebProxy | |
contentType | string | |
headers | string>.Dictionary | |
return |
public static CreatePostHttpResponse ( string url, string postData, int timeout = 8000, string userAgent = null, |
||
url | string | |
postData | string | |
timeout | int | |
userAgent | string | |
cookies | ||
referer | string | |
proxy | IWebProxy | |
contentType | string | |
headers | string>.Dictionary | |
return |
public static GetAllCookies ( |
||
cookieContainer | the CookieContainer | |
return | string>.Dictionary |
public static GetHttpContent ( string url, string postData = null, |
||
url | string | Url |
postData | string | Post的信息 |
cookies | Cookies | |
userAgent | string | 浏览器标识 |
referer | string | 来源页 |
cookiesDomain | string | Cookies的Domian参数,配合cookies使用;为空则取url的Host |
encode | 编码方式,用于解析html | |
method | string | 提交方式,例如POST或GET,默认通过postData是否为空判断 |
proxy | IWebProxy | |
encoding | string | |
contentType | string | |
timeout | int | |
headers | string>.Dictionary | |
return | string |
public static HttpRequest ( string url, string postData = null, |
||
url | string | Url |
postData | string | Post的信息 |
cookies | Cookies | |
userAgent | string | 浏览器标识 |
referer | string | 来源页 |
cookiesDomain | string | Cookies的Domian参数,配合cookies使用;为空则取url的Host |
encode | 编码方式,用于解析html | |
method | string | 提交方式,例如POST或GET,默认通过postData是否为空判断 |
proxy | IWebProxy | |
encoding | string | |
contentType | string | |
timeout | int | |
headers | string>.Dictionary | |
return | Thrinax.Data.HttpResult |