diff --git a/src/IBM.Cloud.SDK.Core/Http/Request.cs b/src/IBM.Cloud.SDK.Core/Http/Request.cs index 75a27ed6..edda99dd 100644 --- a/src/IBM.Cloud.SDK.Core/Http/Request.cs +++ b/src/IBM.Cloud.SDK.Core/Http/Request.cs @@ -49,6 +49,7 @@ public Request(HttpRequestMessage message, MediaTypeFormatterCollection formatte this.Formatters = formatters; this.Dispatch = new Lazy>(() => dispatcher(this)); this.Filters = filters; + this.Message.Headers.Accept.Clear(); } public IRequest WithBody(T body, MediaTypeHeaderValue contentType = null) @@ -71,10 +72,6 @@ public IRequest WithBodyContent(HttpContent body) public IRequest WithHeader(string key, string value) { - if (key == "Accept" && value.StartsWith("audio/", StringComparison.OrdinalIgnoreCase)) - { - this.Message.Headers.Accept.Clear(); - } this.Message.Headers.TryAddWithoutValidation(key, value); return this; }