diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-04 00:07:27 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-04 00:07:27 -0400 |
| commit | 87598ca6d064aa7d3f20ef7ee564aab31f2cb53e (patch) | |
| tree | e23a2808afb4225c432b59cea24306fc95a8d723 /MediaBrowser.Common | |
| parent | 163a1bdbcb4db04d97925aed496746ce5ef52580 (diff) | |
add customizable accept header to http client interface
Diffstat (limited to 'MediaBrowser.Common')
| -rw-r--r-- | MediaBrowser.Common/Net/HttpRequestOptions.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/IHttpClient.cs | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs index 98d02a9f9..77cb8b3df 100644 --- a/MediaBrowser.Common/Net/HttpRequestOptions.cs +++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs @@ -15,6 +15,12 @@ namespace MediaBrowser.Common.Net public string Url { get; set; } /// <summary> + /// Gets or sets the accept header. + /// </summary> + /// <value>The accept header.</value> + public string AcceptHeader { get; set; } + + /// <summary> /// Gets or sets the cancellation token. /// </summary> /// <value>The cancellation token.</value> diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs index 87f9b5d71..2998d1af9 100644 --- a/MediaBrowser.Common/Net/IHttpClient.cs +++ b/MediaBrowser.Common/Net/IHttpClient.cs @@ -28,7 +28,14 @@ namespace MediaBrowser.Common.Net /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{Stream}.</returns> Task<Stream> Get(string url, CancellationToken cancellationToken); - + + /// <summary> + /// Gets the specified options. + /// </summary> + /// <param name="options">The options.</param> + /// <returns>Task{Stream}.</returns> + Task<Stream> Get(HttpRequestOptions options); + /// <summary> /// Performs a POST request /// </summary> |
