We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16f61fa commit ead38f2Copy full SHA for ead38f2
src/RestClient.Net/Client.cs
@@ -155,7 +155,11 @@ public Client(
155
{
156
//Use a shared instance for serialization. There should be no reason that this is not thread safe. Unless it's not.
157
SerializationAdapter = JsonSerializationAdapter.Instance;
158
- DefaultRequestHeaders = DefaultRequestHeaders.WithJsonContentTypeHeader();
+
159
+ DefaultRequestHeaders =
160
+ defaultRequestHeaders == null ? DefaultRequestHeaders.WithJsonContentTypeHeader() :
161
+ defaultRequestHeaders.Contains(HeadersExtensions.ContentTypeHeaderName) ?
162
+ defaultRequestHeaders : defaultRequestHeaders.WithJsonContentTypeHeader();
163
}
164
else
165
0 commit comments