C# 클래스 WebsiteBuilder.HttpClientManager

Class HttpClientManager
파일 보기 프로젝트 열기: MediaBrowser/website

보호된 프로퍼티들

프로퍼티 타입 설명
UsCulture System.Globalization.CultureInfo

공개 메소드들

메소드 설명
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Get ( HttpRequestOptions options ) : Task

Performs a GET request and returns the resulting stream

Get ( string url, CancellationToken cancellationToken ) : Task

Gets the specified URL.

Get ( string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken ) : Task

Performs a GET request and returns the resulting stream

GetResponse ( HttpRequestOptions options ) : Task

Gets the response internal.

HttpClientManager ( ) : System

Initializes a new instance of the HttpClientManager class.

Post ( HttpRequestOptions options ) : Task
Post ( HttpRequestOptions options, string>.Dictionary postData ) : Task

Performs a POST request

Post ( string url, string>.Dictionary postData, CancellationToken cancellationToken ) : Task

Posts the specified URL.

Post ( string url, string>.Dictionary postData, SemaphoreSlim resourcePool, CancellationToken cancellationToken ) : Task

Performs a POST request

SendAsync ( HttpRequestOptions options, string httpMethod ) : Task

send as an asynchronous operation.

보호된 메소드들

메소드 설명
Dispose ( bool dispose ) : void

Releases unmanaged and - optionally - managed resources.

비공개 메소드들

메소드 설명
AddRequestHeaders ( HttpWebRequest request, HttpRequestOptions options ) : void
CacheResponse ( HttpResponseInfo response, string responseCachePath ) : Task
CreateWebRequest ( string url ) : WebRequest
EnsureSuccessStatusCode ( HttpClientInfo client, HttpWebResponse response, HttpRequestOptions options ) : void
GetCachedResponse ( string responseCachePath, System.TimeSpan cacheLength, string url ) : Task
GetCancellationException ( HttpRequestOptions options, HttpClientInfo client, CancellationToken cancellationToken, OperationCanceledException exception ) : Exception

Throws the cancellation exception.

GetContentLength ( HttpWebResponse response ) : long?
GetException ( Exception ex, HttpRequestOptions options, HttpClientInfo client ) : Exception
GetHostFromUrl ( string url ) : string

Gets the host from URL.

GetHttpClient ( string host, bool enableHttpCompression ) : HttpClientInfo

Gets

GetRequest ( HttpRequestOptions options, string method, bool enableHttpCompression ) : WebRequest
GetResponseAsync ( WebRequest request, System.TimeSpan timeout ) : Task
GetResponseInfo ( HttpWebResponse httpResponse, Stream content, long contentLength, IDisposable disposable ) : HttpResponseInfo
GetResponseInfo ( HttpWebResponse httpResponse, string tempFile, long contentLength ) : HttpResponseInfo
SendAsyncInternal ( HttpRequestOptions options, string httpMethod ) : Task
TimeoutCallback ( object state, bool timedOut ) : void
ValidateParams ( HttpRequestOptions options ) : void

메소드 상세

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool dispose ) : void
dispose bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

Get() 공개 메소드

Performs a GET request and returns the resulting stream
public Get ( HttpRequestOptions options ) : Task
options HttpRequestOptions The options.
리턴 Task

Get() 공개 메소드

Gets the specified URL.
public Get ( string url, CancellationToken cancellationToken ) : Task
url string The URL.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 Task

Get() 공개 메소드

Performs a GET request and returns the resulting stream
public Get ( string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken ) : Task
url string The URL.
resourcePool System.Threading.SemaphoreSlim The resource pool.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 Task

GetResponse() 공개 메소드

Gets the response internal.
public GetResponse ( HttpRequestOptions options ) : Task
options HttpRequestOptions The options.
리턴 Task

HttpClientManager() 공개 메소드

Initializes a new instance of the HttpClientManager class.
appPaths /// or /// logger
public HttpClientManager ( ) : System
리턴 System

Post() 공개 메소드

public Post ( HttpRequestOptions options ) : Task
options HttpRequestOptions
리턴 Task

Post() 공개 메소드

Performs a POST request
public Post ( HttpRequestOptions options, string>.Dictionary postData ) : Task
options HttpRequestOptions The options.
postData string>.Dictionary Params to add to the POST data.
리턴 Task

Post() 공개 메소드

Posts the specified URL.
public Post ( string url, string>.Dictionary postData, CancellationToken cancellationToken ) : Task
url string The URL.
postData string>.Dictionary The post data.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 Task

Post() 공개 메소드

Performs a POST request
public Post ( string url, string>.Dictionary postData, SemaphoreSlim resourcePool, CancellationToken cancellationToken ) : Task
url string The URL.
postData string>.Dictionary Params to add to the POST data.
resourcePool System.Threading.SemaphoreSlim The resource pool.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 Task

SendAsync() 공개 메소드

send as an asynchronous operation.
///
public SendAsync ( HttpRequestOptions options, string httpMethod ) : Task
options HttpRequestOptions The options.
httpMethod string The HTTP method.
리턴 Task

프로퍼티 상세

UsCulture 보호되어 있는 정적으로 프로퍼티

protected static CultureInfo,System.Globalization UsCulture
리턴 System.Globalization.CultureInfo