C# Class Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient

Inheritance: IHttpClient
Show file Open project: SignalR/SignalR Class Usage Examples

Public Methods

Method Description
DefaultHttpClient ( ) : System
Get ( string url, Action prepareRequest, bool isLongRunning ) : Task

Makes an asynchronous http GET request to the specified url.

Initialize ( IConnection connection ) : void
Post ( string url, Action prepareRequest, string>.IDictionary postData, bool isLongRunning ) : Task

Makes an asynchronous http POST request to the specified url.

Protected Methods

Method Description
CreateHandler ( ) : HttpMessageHandler

Private Methods

Method Description
GetHttpClient ( bool isLongRunning ) : HttpClient

Returns the appropriate client based on whether it is a long running request

PrepareClientRequest ( HttpWebRequestWrapper req ) : void

Adds certificates, credentials, proxies and cookies to the request

Method Details

CreateHandler() protected method

protected CreateHandler ( ) : HttpMessageHandler
return System.Net.Http.HttpMessageHandler

DefaultHttpClient() public method

public DefaultHttpClient ( ) : System
return System

Get() public method

Makes an asynchronous http GET request to the specified url.
public Get ( string url, Action prepareRequest, bool isLongRunning ) : Task
url string The url to send the request to.
prepareRequest Action A callback that initializes the request with default values.
isLongRunning bool Indicates whether the request is long running
return Task

Initialize() public method

public Initialize ( IConnection connection ) : void
connection IConnection
return void

Post() public method

Makes an asynchronous http POST request to the specified url.
public Post ( string url, Action prepareRequest, string>.IDictionary postData, bool isLongRunning ) : Task
url string The url to send the request to.
prepareRequest Action A callback that initializes the request with default values.
postData string>.IDictionary form url encoded data.
isLongRunning bool Indicates whether the request is long running
return Task