C# Класс RestSharp.Http

HttpWebRequest wrapper (sync methods)
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AsGet() публичный Метод

Execute a GET-style request with the specified HTTP Method.
public AsGet ( string httpMethod ) : HttpResponse
httpMethod string The HTTP method to execute.
Результат HttpResponse

AsGetAsync() публичный Метод

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.
Результат System.Net.HttpWebRequest

AsPost() публичный Метод

Execute a POST-style request with the specified HTTP Method.
public AsPost ( string httpMethod ) : HttpResponse
httpMethod string The HTTP method to execute.
Результат HttpResponse

AsPostAsync() публичный Метод

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.
Результат System.Net.HttpWebRequest

Delete() публичный Метод

Execute a DELETE request
public Delete ( ) : HttpResponse
Результат HttpResponse

DeleteAsync() публичный Метод

public DeleteAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest

Get() публичный Метод

Execute a GET request
public Get ( ) : HttpResponse
Результат HttpResponse

GetAsync() публичный Метод

public GetAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest

Head() публичный Метод

Execute a HEAD request
public Head ( ) : HttpResponse
Результат HttpResponse

HeadAsync() публичный Метод

public HeadAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest

Options() публичный Метод

Execute an OPTIONS request
public Options ( ) : HttpResponse
Результат HttpResponse

OptionsAsync() публичный Метод

public OptionsAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest

Patch() публичный Метод

Execute a PATCH request
public Patch ( ) : HttpResponse
Результат HttpResponse

PatchAsync() публичный Метод

public PatchAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest

Post() публичный Метод

Execute a POST request
public Post ( ) : HttpResponse
Результат HttpResponse

PostAsync() публичный Метод

public PostAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest

Put() публичный Метод

Execute a PUT request
public Put ( ) : HttpResponse
Результат HttpResponse

PutAsync() публичный Метод

public PutAsync ( Action action ) : HttpWebRequest
action Action
Результат System.Net.HttpWebRequest