From 8a1b12b7d805ce35f4e10acf2294f355f47e75e3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 28 Jun 2013 16:25:58 -0400 Subject: tightened up image saving to reduce knowledge of file names --- MediaBrowser.Common/Net/HttpResponseInfo.cs | 29 +++++++++++++++++++++++++++++ MediaBrowser.Common/Net/IHttpClient.cs | 7 +++++++ 2 files changed, 36 insertions(+) create mode 100644 MediaBrowser.Common/Net/HttpResponseInfo.cs (limited to 'MediaBrowser.Common/Net') 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 +{ + /// + /// Class HttpResponseInfo + /// + public class HttpResponseInfo + { + /// + /// Gets or sets the type of the content. + /// + /// The type of the content. + public string ContentType { get; set; } + + /// + /// Gets or sets the content. + /// + /// The content. + public Stream Content { get; set; } + + /// + /// Gets or sets the status code. + /// + /// The status code. + 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 @@ -11,6 +11,13 @@ namespace MediaBrowser.Common.Net /// public interface IHttpClient : IDisposable { + /// + /// Gets the response. + /// + /// The options. + /// Task{HttpResponseInfo}. + Task GetResponse(HttpRequestOptions options); + /// /// Performs a GET request and returns the resulting stream /// -- cgit v1.2.3