aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-28 16:25:58 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-28 16:25:58 -0400
commit8a1b12b7d805ce35f4e10acf2294f355f47e75e3 (patch)
tree71fc6b154b3b4e335fe9af1a58fdb584042dd92a /MediaBrowser.Common/Net
parentac7d6256f460ce459a5b5c824e1b32d23e120901 (diff)
tightened up image saving to reduce knowledge of file names
Diffstat (limited to 'MediaBrowser.Common/Net')
-rw-r--r--MediaBrowser.Common/Net/HttpResponseInfo.cs29
-rw-r--r--MediaBrowser.Common/Net/IHttpClient.cs7
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>