Interface IHttpClient
Interface IHttpClient
Namespace: MediaBrowser.Common.Net
Assembly: MediaBrowser.Common.dll
Syntax
public interface IHttpClient
Methods
Get(HttpRequestOptions)
Gets the specified options.
Declaration
Task<Stream> Get(HttpRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options | The options. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> | Task{Stream}. |
GetConnectionContext(HttpRequestOptions)
Declaration
IDisposable GetConnectionContext(HttpRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options |
Returns
Type | Description |
---|---|
System.IDisposable |
GetResponse(HttpRequestOptions)
Gets the response.
Declaration
Task<HttpResponseInfo> GetResponse(HttpRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options | The options. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<HttpResponseInfo> | Task{HttpResponseInfo}. |
GetTempFile(HttpRequestOptions)
Downloads the contents of a given url into a temporary location
Declaration
Task<string> GetTempFile(HttpRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options | The options. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Task{System.String}. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | progress |
HttpException |
GetTempFileResponse(HttpRequestOptions)
Gets the temporary file response.
Declaration
Task<HttpResponseInfo> GetTempFileResponse(HttpRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options | The options. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<HttpResponseInfo> | Task{HttpResponseInfo}. |
Post(HttpRequestOptions)
Posts the specified options.
Declaration
Task<HttpResponseInfo> Post(HttpRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options | The options. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<HttpResponseInfo> | Task{HttpResponseInfo}. |
SendAsync(HttpRequestOptions, String)
Sends the asynchronous.
Declaration
Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod)
Parameters
Type | Name | Description |
---|---|---|
HttpRequestOptions | options | The options. |
System.String | httpMethod | The HTTP method. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<HttpResponseInfo> | Task{HttpResponseInfo}. |