aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common/Net')
-rw-r--r--MediaBrowser.Common/Net/HttpRequestOptions.cs4
-rw-r--r--MediaBrowser.Common/Net/IHttpClient.cs47
2 files changed, 4 insertions, 47 deletions
diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs
index 4a894e662..51859ecdb 100644
--- a/MediaBrowser.Common/Net/HttpRequestOptions.cs
+++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
+using System.Text;
namespace MediaBrowser.Common.Net
{
@@ -90,6 +91,7 @@ namespace MediaBrowser.Common.Net
public bool BufferContent { get; set; }
public bool LogRequest { get; set; }
+ public bool LogRequestAsDebug { get; set; }
public bool LogErrors { get; set; }
public bool LogErrorResponseBody { get; set; }
@@ -102,6 +104,8 @@ namespace MediaBrowser.Common.Net
public bool PreferIpv4 { get; set; }
public bool EnableDefaultUserAgent { get; set; }
+ public bool AppendCharsetToMimeType { get; set; }
+
private string GetHeaderValue(string name)
{
string value;
diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs
index 15257715f..cf5511965 100644
--- a/MediaBrowser.Common/Net/IHttpClient.cs
+++ b/MediaBrowser.Common/Net/IHttpClient.cs
@@ -19,24 +19,6 @@ namespace MediaBrowser.Common.Net
Task<HttpResponseInfo> GetResponse(HttpRequestOptions options);
/// <summary>
- /// Performs a GET request and returns the resulting stream
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="resourcePool">The resource pool.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task{Stream}.</returns>
- /// <exception cref="MediaBrowser.Model.Net.HttpException"></exception>
- Task<Stream> Get(string url, SemaphoreSlim resourcePool, CancellationToken cancellationToken);
-
- /// <summary>
- /// Gets the specified URL.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <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>
@@ -52,35 +34,6 @@ namespace MediaBrowser.Common.Net
Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod);
/// <summary>
- /// Performs a POST request
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="postData">Params to add to the POST data.</param>
- /// <param name="resourcePool">The resource pool.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>stream on success, null on failure</returns>
- /// <exception cref="System.ArgumentNullException">postData</exception>
- /// <exception cref="MediaBrowser.Model.Net.HttpException"></exception>
- Task<Stream> Post(string url, Dictionary<string, string> postData, SemaphoreSlim resourcePool, CancellationToken cancellationToken);
-
- /// <summary>
- /// Posts the specified URL.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <param name="postData">The post data.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task{Stream}.</returns>
- Task<Stream> Post(string url, Dictionary<string, string> postData, CancellationToken cancellationToken);
-
- /// <summary>
- /// Posts the specified options with post data
- /// </summary>
- /// <param name="options">The options</param>
- /// <param name="postData">The post data</param>
- /// <returns>Task{Stream}</returns>
- Task<Stream> Post(HttpRequestOptions options, Dictionary<string, string> postData);
-
- /// <summary>
/// Posts the specified options.
/// </summary>
/// <param name="options">The options.</param>