C# Class HttpRequest.HttpHelper

Http连接操作帮助类
显示文件 Open project: vla/FastHttpRequest

Public Methods

Method Description
Body ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : HttpResult

请求发送 Body

Body ( string url, Stream body, Action callback, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : void

Http异步请求发送 Body

Body ( string url, Stream body, Action callback, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : void

Http异步请求发送 Body

Body ( string url, Stream body, Action callback, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : void

Http异步请求发送 Body

BodyTask ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : Task

Http异步请求发送 Body

BodyToBytes ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : byte[]

请求发送 Body

BodyToString ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : string

请求发送 Body

Delete ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Delete

Delete ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Delete

Delete ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Delete方法

Delete ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Delete方法

Delete ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Delete方法

Delete ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Delete方法

Delete ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Delete方法

Delete ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Delete方法

DeleteTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Delete方法

DeleteTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Delete方法

DeleteToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Delete

DeleteToBytes ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Delete

DeleteToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Delete

DeleteToString ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Delete

Get ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : HttpResult

请求发送 Get

Get ( string url, string contentType = "", WebHeaderCollection header = null ) : HttpResult

请求发送 Get

Get ( string url, Action callback, string contentType = "", WebHeaderCollection header = null ) : void

Http异步请求Get方法

Get ( string url, Action callback, string contentType = "", WebHeaderCollection header = null ) : void

Http异步请求Get方法

Get ( string url, Action callback, string contentType = "", WebHeaderCollection header = null ) : void

Http异步请求Get方法

Get ( string url, object parameters, Action callback, string contentType = "", WebHeaderCollection header = null ) : void

Http异步请求Get方法

Get ( string url, object parameters, Action callback, string contentType = "", WebHeaderCollection header = null ) : void

Http异步请求Get方法

Get ( string url, object parameters, Action callback, string contentType = "", WebHeaderCollection header = null ) : void

Http异步请求Get方法

GetBytes ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : byte[]

请求发送 Get

GetBytes ( string url, string contentType = "", WebHeaderCollection header = null ) : byte[]

请求发送 Get

GetString ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : string

请求发送 Get

GetString ( string url, string contentType = "", WebHeaderCollection header = null ) : string

请求发送 Get

GetTask ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : Task

Http异步请求Get方法

GetTask ( string url, string contentType = "", WebHeaderCollection header = null ) : Task

Http异步请求Get方法

Head ( string url, WebHeaderCollection header = null ) : WebHeaderCollection

请求发送 Head

Head ( string url, Action callback, WebHeaderCollection header = null ) : void

Http异步请求Head方法

HeadInfo ( string url, WebHeaderCollection header = null ) : HttpResult

请求发送 Head

HeadTask ( string url, WebHeaderCollection header = null ) : Task

Http异步请求Head方法

Patch ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Patch

Patch ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Patch

Patch ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Patch方法

Patch ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Patch方法

Patch ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Patch方法

Patch ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Patch方法

Patch ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Patch方法

Patch ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Patch方法

PatchTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Patch方法

PatchTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Patch方法

PatchToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Patch

PatchToBytes ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Patch

PatchToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Patch

PatchToString ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Patch

Post ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Post

Post ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Post方法

Post ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Post方法

Post ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Post方法

PostTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Post方法

PostTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Post方法

PostToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Post

PostToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Post

Put ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Put

Put ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

请求发送 Put

Put ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Put方法

Put ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Put方法

Put ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Put方法

Put ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Put方法

Put ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Put方法

Put ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

Http异步请求Put方法

PutTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Put方法

PutTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

Http异步请求Put方法

PutToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Put

PutToBytes ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

请求发送 Put

PutToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Put

PutToString ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

请求发送 Put

Request ( HttpParam httpParam ) : HttpResult

Http请求发送

Request ( HttpParam httpParam, NamedFileStream files ) : HttpResult

Http请求发送文件

Request ( HttpParam httpParam, Stream body ) : HttpResult

Http请求发送

Request ( HttpParam httpParam, object>.Action callback, object userState ) : void

Http异步请求发送

Request ( HttpParam httpParam, Action callback ) : void

Http异步请求发送

Request ( HttpParam httpParam, NamedFileStream files, object>.Action callback, object userState ) : void

Http异步请求发送

Request ( HttpParam httpParam, NamedFileStream files, Action callback ) : void

Http异步请求发送

Request ( HttpParam httpParam, Stream body, object>.Action callback, object userState ) : void

Http异步请求发送

Request ( HttpParam httpParam, Stream body, Action callback ) : void

Http异步请求发送

Upload ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult

上传文件

Upload ( string url, NamedFileStream files, Action callback, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

异步上传文件

Upload ( string url, NamedFileStream files, Action callback, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

异步上传文件

Upload ( string url, NamedFileStream files, Action callback, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void

异步上传文件

UploadTask ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task

异步上传文件

UploadToBytes ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]

上传文件

UploadToString ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string

上传文件

Private Methods

Method Description
CopyStream ( Stream source, Stream target, int blockSize = 4096 ) : long
GetEncodingFromHeaders ( WebHeaderCollection headers ) : string
Process ( HttpWebResponse response ) : HttpResult
ProcessCallback ( IAsyncResult callbackResult, Action callback ) : void

处理请求回调

ProcessFailCallback ( Action callback, Exception ex ) : void

处理失败的请求

RandomString ( int length ) : string
SerializeQuery ( object parameters ) : IDictionary
SerializeQueryString ( object parameters ) : string
SetRequest ( HttpWebRequest request, HttpParam httpParam ) : void

设置请求属性

StreamToBytesCallback ( Action callback ) : Action
StreamToStringCallback ( Action callback ) : Action
UrlEncode ( string stringToEscape ) : string

Uri编码

_AsyncRq ( string url, Action callback, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : void
_AsyncRq ( string url, Action callback, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : void
_AsyncRq ( string url, Action callback, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : void
_AsyncRq ( string url, object parameters, Action callback, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : void
_AsyncRq ( string url, object parameters, Action callback, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : void
_AsyncRq ( string url, object parameters, Action callback, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : void
_Rq ( string url, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : HttpResult
_Rq ( string url, object parameters, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : HttpResult
_TaskRq ( string url, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : Task
_TaskRq ( string url, object parameters, System.Net.HttpVerb method, string contentType, WebHeaderCollection header ) : Task

Method Details

Body() public static method

请求发送 Body
public static Body ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : HttpResult
url string url地址
body Stream body
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Body() public static method

Http异步请求发送 Body
public static Body ( string url, Stream body, Action callback, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : void
url string url地址
body Stream Body
callback Action 回调函数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection
return void

Body() public static method

Http异步请求发送 Body
public static Body ( string url, Stream body, Action callback, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : void
url string url地址
body Stream Body
callback Action 回调函数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection
return void

Body() public static method

Http异步请求发送 Body
public static Body ( string url, Stream body, Action callback, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : void
url string url地址
body Stream Body
callback Action 回调函数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection
return void

BodyTask() public static method

Http异步请求发送 Body
public static BodyTask ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : Task
url string url地址
body Stream Body
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection
return Task

BodyToBytes() public static method

请求发送 Body
public static BodyToBytes ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : byte[]
url string url地址
body Stream body
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

BodyToString() public static method

请求发送 Body
public static BodyToString ( string url, Stream body, System.Net.HttpVerb method = HttpVerb.Get, string contentType = "text/json", WebHeaderCollection header = null ) : string
url string url地址
body Stream body
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

Delete() public static method

请求发送 Delete
public static Delete ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Delete() public static method

请求发送 Delete
public static Delete ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Delete() public static method

Http异步请求Delete方法
public static Delete ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Delete() public static method

Http异步请求Delete方法
public static Delete ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Delete() public static method

Http异步请求Delete方法
public static Delete ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Delete() public static method

Http异步请求Delete方法
public static Delete ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Delete() public static method

Http异步请求Delete方法
public static Delete ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Delete() public static method

Http异步请求Delete方法
public static Delete ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

DeleteTask() public static method

Http异步请求Delete方法
public static DeleteTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection
return Task

DeleteTask() public static method

Http异步请求Delete方法
public static DeleteTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection
return Task

DeleteToBytes() public static method

请求发送 Delete
public static DeleteToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

DeleteToBytes() public static method

请求发送 Delete
public static DeleteToBytes ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

DeleteToString() public static method

请求发送 Delete
public static DeleteToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

DeleteToString() public static method

请求发送 Delete
public static DeleteToString ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

Get() public static method

请求发送 Get
public static Get ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : HttpResult
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Get() public static method

请求发送 Get
public static Get ( string url, string contentType = "", WebHeaderCollection header = null ) : HttpResult
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Get() public static method

Http异步请求Get方法
public static Get ( string url, Action callback, string contentType = "", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Get() public static method

Http异步请求Get方法
public static Get ( string url, Action callback, string contentType = "", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Get() public static method

Http异步请求Get方法
public static Get ( string url, Action callback, string contentType = "", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Get() public static method

Http异步请求Get方法
public static Get ( string url, object parameters, Action callback, string contentType = "", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Get() public static method

Http异步请求Get方法
public static Get ( string url, object parameters, Action callback, string contentType = "", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Get() public static method

Http异步请求Get方法
public static Get ( string url, object parameters, Action callback, string contentType = "", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

GetBytes() public static method

请求发送 Get
public static GetBytes ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : byte[]
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

GetBytes() public static method

请求发送 Get
public static GetBytes ( string url, string contentType = "", WebHeaderCollection header = null ) : byte[]
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

GetString() public static method

请求发送 Get
public static GetString ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : string
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

GetString() public static method

请求发送 Get
public static GetString ( string url, string contentType = "", WebHeaderCollection header = null ) : string
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

GetTask() public static method

Http异步请求Get方法
public static GetTask ( string url, object parameters, string contentType = "", WebHeaderCollection header = null ) : Task
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection
return Task

GetTask() public static method

Http异步请求Get方法
public static GetTask ( string url, string contentType = "", WebHeaderCollection header = null ) : Task
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection
return Task

Head() public static method

请求发送 Head
public static Head ( string url, WebHeaderCollection header = null ) : WebHeaderCollection
url string url地址
header System.Net.WebHeaderCollection WebHeaderCollection
return System.Net.WebHeaderCollection

Head() public static method

Http异步请求Head方法
public static Head ( string url, Action callback, WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
header System.Net.WebHeaderCollection
return void

HeadInfo() public static method

请求发送 Head
public static HeadInfo ( string url, WebHeaderCollection header = null ) : HttpResult
url string url地址
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

HeadTask() public static method

Http异步请求Head方法
public static HeadTask ( string url, WebHeaderCollection header = null ) : Task
url string url地址
header System.Net.WebHeaderCollection
return Task

Patch() public static method

请求发送 Patch
public static Patch ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Patch() public static method

请求发送 Patch
public static Patch ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Patch() public static method

Http异步请求Patch方法
public static Patch ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Patch() public static method

Http异步请求Patch方法
public static Patch ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Patch() public static method

Http异步请求Patch方法
public static Patch ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Patch() public static method

Http异步请求Patch方法
public static Patch ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Patch() public static method

Http异步请求Patch方法
public static Patch ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Patch() public static method

Http异步请求Patch方法
public static Patch ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

PatchTask() public static method

Http异步请求Patch方法
public static PatchTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection
return Task

PatchTask() public static method

Http异步请求Patch方法
public static PatchTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection
return Task

PatchToBytes() public static method

请求发送 Patch
public static PatchToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

PatchToBytes() public static method

请求发送 Patch
public static PatchToBytes ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

PatchToString() public static method

请求发送 Patch
public static PatchToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

PatchToString() public static method

请求发送 Patch
public static PatchToString ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

Post() public static method

请求发送 Post
public static Post ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Post() public static method

Http异步请求Post方法
public static Post ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Post() public static method

Http异步请求Post方法
public static Post ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Post() public static method

Http异步请求Post方法
public static Post ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

PostTask() public static method

Http异步请求Post方法
public static PostTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection
return Task

PostTask() public static method

Http异步请求Post方法
public static PostTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection
return Task

PostToBytes() public static method

请求发送 Post
public static PostToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

PostToString() public static method

请求发送 Post
public static PostToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

Put() public static method

请求发送 Put
public static Put ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Put() public static method

请求发送 Put
public static Put ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Put() public static method

Http异步请求Put方法
public static Put ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Put() public static method

Http异步请求Put方法
public static Put ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Put() public static method

Http异步请求Put方法
public static Put ( string url, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Put() public static method

Http异步请求Put方法
public static Put ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Put() public static method

Http异步请求Put方法
public static Put ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

Put() public static method

Http异步请求Put方法
public static Put ( string url, object parameters, Action callback, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
parameters object 请求参数
callback Action 回调函数
contentType string contentType
header System.Net.WebHeaderCollection
return void

PutTask() public static method

Http异步请求Put方法
public static PutTask ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection
return Task

PutTask() public static method

Http异步请求Put方法
public static PutTask ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection
return Task

PutToBytes() public static method

请求发送 Put
public static PutToBytes ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

PutToBytes() public static method

请求发送 Put
public static PutToBytes ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

PutToString() public static method

请求发送 Put
public static PutToString ( string url, object parameters, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
parameters object 请求参数
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

PutToString() public static method

请求发送 Put
public static PutToString ( string url, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string

Request() public static method

Http请求发送
public static Request ( HttpParam httpParam ) : HttpResult
httpParam HttpParam 请求参数
return HttpResult

Request() public static method

Http请求发送文件
public static Request ( HttpParam httpParam, NamedFileStream files ) : HttpResult
httpParam HttpParam 请求参数
files NamedFileStream 文件上传的信息
return HttpResult

Request() public static method

Http请求发送
public static Request ( HttpParam httpParam, Stream body ) : HttpResult
httpParam HttpParam 请求参数
body Stream Http Body
return HttpResult

Request() public static method

Http异步请求发送
public static Request ( HttpParam httpParam, object>.Action callback, object userState ) : void
httpParam HttpParam 请求参数
callback object>.Action 返回请求响应结果回调
userState object 状态
return void

Request() public static method

Http异步请求发送
public static Request ( HttpParam httpParam, Action callback ) : void
httpParam HttpParam 请求参数
callback Action 返回请求响应结果回调
return void

Request() public static method

Http异步请求发送
public static Request ( HttpParam httpParam, NamedFileStream files, object>.Action callback, object userState ) : void
httpParam HttpParam 请求参数
files NamedFileStream 文件上传的信息
callback object>.Action 返回请求响应结果回调
userState object 状态
return void

Request() public static method

Http异步请求发送
public static Request ( HttpParam httpParam, NamedFileStream files, Action callback ) : void
httpParam HttpParam 请求参数
files NamedFileStream 文件上传的信息
callback Action 返回请求响应结果回调
return void

Request() public static method

Http异步请求发送
public static Request ( HttpParam httpParam, Stream body, object>.Action callback, object userState ) : void
httpParam HttpParam 请求参数
body Stream Http Body
callback object>.Action 返回请求响应结果回调
userState object 状态
return void

Request() public static method

Http异步请求发送
public static Request ( HttpParam httpParam, Stream body, Action callback ) : void
httpParam HttpParam 请求参数
body Stream Http Body
callback Action 返回请求响应结果回调
return void

Upload() public static method

上传文件
public static Upload ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : HttpResult
url string url地址
files NamedFileStream 文件信息
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return HttpResult

Upload() public static method

异步上传文件
public static Upload ( string url, NamedFileStream files, Action callback, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
files NamedFileStream 文件信息
callback Action 回调函数
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection header
return void

Upload() public static method

异步上传文件
public static Upload ( string url, NamedFileStream files, Action callback, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
files NamedFileStream 文件信息
callback Action 回调函数
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection header
return void

Upload() public static method

异步上传文件
public static Upload ( string url, NamedFileStream files, Action callback, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : void
url string url地址
files NamedFileStream 文件信息
callback Action 回调函数
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection header
return void

UploadTask() public static method

异步上传文件
public static UploadTask ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : Task
url string url地址
files NamedFileStream 文件信息
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection header
return Task

UploadToBytes() public static method

上传文件
public static UploadToBytes ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : byte[]
url string url地址
files NamedFileStream 文件信息
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return byte[]

UploadToString() public static method

上传文件
public static UploadToString ( string url, NamedFileStream files, object parameters = null, System.Net.HttpVerb method = HttpVerb.Post, string contentType = "application/x-www-form-urlencoded", WebHeaderCollection header = null ) : string
url string url地址
files NamedFileStream 文件信息
parameters object 请求参数
method System.Net.HttpVerb 请求方法
contentType string contentType
header System.Net.WebHeaderCollection WebHeaderCollection
return string