aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs')
-rw-r--r--MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
index 69533ef9d..a88f457c5 100644
--- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
+++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
@@ -230,10 +230,11 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
var httpWebRequest = GetRequest(options, httpMethod, options.EnableHttpCompression);
- if (!string.IsNullOrEmpty(options.RequestContent) || string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase))
+ if (options.RequestContentBytes != null ||
+ !string.IsNullOrEmpty(options.RequestContent) ||
+ string.Equals(httpMethod, "post", StringComparison.OrdinalIgnoreCase))
{
- var content = options.RequestContent ?? string.Empty;
- var bytes = Encoding.UTF8.GetBytes(content);
+ var bytes = options.RequestContentBytes ?? Encoding.UTF8.GetBytes(options.RequestContent ?? string.Empty);
httpWebRequest.ContentType = options.RequestContentType ?? "application/x-www-form-urlencoded";
httpWebRequest.ContentLength = bytes.Length;