diff options
Diffstat (limited to 'MediaBrowser.Common/Net')
| -rw-r--r-- | MediaBrowser.Common/Net/HttpResponseInfo.cs | 29 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/IHttpClient.cs | 7 |
2 files changed, 36 insertions, 0 deletions
diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.cs new file mode 100644 index 0000000000..558218ed16 --- /dev/null +++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs @@ -0,0 +1,29 @@ +using System.IO; +using System.Net; + +namespace MediaBrowser.Common.Net +{ + /// <summary> + /// Class HttpResponseInfo + /// </summary> + public class HttpResponseInfo + { + /// <summary> + /// Gets or sets the type of the content. + /// </summary> + /// <value>The type of the content.</value> + public string ContentType { get; set; } + + /// <summary> + /// Gets or sets the content. + /// </summary> + /// <value>The content.</value> + public Stream Content { get; set; } + + /// <summary> + /// Gets or sets the status code. + /// </summary> + /// <value>The status code.</value> + public HttpStatusCode StatusCode { get; set; } + } +} diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs index 2998d1af9b..6068d4e8c8 100644 --- a/MediaBrowser.Common/Net/IHttpClient.cs +++ b/MediaBrowser.Common/Net/IHttpClient.cs @@ -12,6 +12,13 @@ namespace MediaBrowser.Common.Net public interface IHttpClient : IDisposable { /// <summary> + /// Gets the response. + /// </summary> + /// <param name="options">The options.</param> + /// <returns>Task{HttpResponseInfo}.</returns> + Task<HttpResponseInfo> GetResponse(HttpRequestOptions options); + + /// <summary> /// Performs a GET request and returns the resulting stream /// </summary> /// <param name="url">The URL.</param> |
