C# Class RestSharp.Http

HttpWebRequest wrapper (sync methods)
显示文件 Open project: Cratesmith/RestSharp-for-unity3d

Public Methods

Method Description
AsGet ( string httpMethod ) : HttpResponse

Execute a GET-style request with the specified HTTP Method.

AsGetAsync ( Action action, string httpMethod ) : HttpWebRequest

Execute an async GET-style request with the specified HTTP Method.

AsPost ( string httpMethod ) : HttpResponse

Execute a POST-style request with the specified HTTP Method.

AsPostAsync ( Action action, string httpMethod ) : HttpWebRequest

Execute an async POST-style request with the specified HTTP Method.

Delete ( ) : HttpResponse

Execute a DELETE request

DeleteAsync ( Action action ) : HttpWebRequest
Get ( ) : HttpResponse

Execute a GET request

GetAsync ( Action action ) : HttpWebRequest
Head ( ) : HttpResponse

Execute a HEAD request

HeadAsync ( Action action ) : HttpWebRequest
Options ( ) : HttpResponse

Execute an OPTIONS request

OptionsAsync ( Action action ) : HttpWebRequest
Patch ( ) : HttpResponse

Execute a PATCH request

PatchAsync ( Action action ) : HttpWebRequest
Post ( ) : HttpResponse

Execute a POST request

PostAsync ( Action action ) : HttpWebRequest
Put ( ) : HttpResponse

Execute a PUT request

PutAsync ( Action action ) : HttpWebRequest

Private Methods

Method Description
AddAsyncHeaderActions ( ) : void
AddSyncHeaderActions ( ) : void
CalculateContentLength ( ) : long
ConfigureAsyncWebRequest ( string method, Uri url ) : HttpWebRequest
ConfigureWebRequest ( string method, Uri url ) : HttpWebRequest
ExecuteCallback ( HttpResponse response, Action callback ) : void
GetRawResponse ( HttpWebRequest request ) : HttpWebResponse
GetRawResponseAsync ( IAsyncResult result, Action callback ) : void
GetResponse ( HttpWebRequest request ) : HttpResponse
GetStyleMethodInternal ( string method ) : HttpResponse
GetStyleMethodInternalAsync ( string method, Action callback ) : HttpWebRequest
PostPutInternal ( string method ) : HttpResponse
PreparePostData ( HttpWebRequest webRequest ) : void
PutPostInternalAsync ( string method, Action callback ) : HttpWebRequest
RequestStreamCallback ( IAsyncResult result, Action callback ) : void
ResponseCallback ( IAsyncResult result, Action callback ) : void
SetTimeout ( IAsyncResult asyncResult, TimeOutState timeOutState ) : void
TimeoutCallback ( object state, bool timedOut ) : void
WriteRequestBody ( HttpWebRequest webRequest ) : void
WriteRequestBodyAsync ( HttpWebRequest webRequest, Action callback ) : void

Method Details

AsGet() public method

Execute a GET-style request with the specified HTTP Method.
public AsGet ( string httpMethod ) : HttpResponse
httpMethod string The HTTP method to execute.
return HttpResponse

AsGetAsync() public method

Execute an async GET-style request with the specified HTTP Method.
public AsGetAsync ( Action action, string httpMethod ) : HttpWebRequest
action Action
httpMethod string The HTTP method to execute.
return System.Net.HttpWebRequest

AsPost() public method

Execute a POST-style request with the specified HTTP Method.
public AsPost ( string httpMethod ) : HttpResponse
httpMethod string The HTTP method to execute.
return HttpResponse

AsPostAsync() public method

Execute an async POST-style request with the specified HTTP Method.
public AsPostAsync ( Action action, string httpMethod ) : HttpWebRequest
action Action
httpMethod string The HTTP method to execute.
return System.Net.HttpWebRequest

Delete() public method

Execute a DELETE request
public Delete ( ) : HttpResponse
return HttpResponse

DeleteAsync() public method

public DeleteAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest

Get() public method

Execute a GET request
public Get ( ) : HttpResponse
return HttpResponse

GetAsync() public method

public GetAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest

Head() public method

Execute a HEAD request
public Head ( ) : HttpResponse
return HttpResponse

HeadAsync() public method

public HeadAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest

Options() public method

Execute an OPTIONS request
public Options ( ) : HttpResponse
return HttpResponse

OptionsAsync() public method

public OptionsAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest

Patch() public method

Execute a PATCH request
public Patch ( ) : HttpResponse
return HttpResponse

PatchAsync() public method

public PatchAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest

Post() public method

Execute a POST request
public Post ( ) : HttpResponse
return HttpResponse

PostAsync() public method

public PostAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest

Put() public method

Execute a PUT request
public Put ( ) : HttpResponse
return HttpResponse

PutAsync() public method

public PutAsync ( Action action ) : HttpWebRequest
action Action
return System.Net.HttpWebRequest