File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ public virtual HttpRequestMessage ToHttpRequestMessage(GraphQLHttpClientOptions
3535 } ;
3636 message . Headers . Accept . Add ( new MediaTypeWithQualityHeaderValue ( "application/graphql-response+json" ) ) ;
3737 message . Headers . Accept . Add ( new MediaTypeWithQualityHeaderValue ( "application/json" ) ) ;
38- message . Headers . AcceptCharset . Add ( new StringWithQualityHeaderValue ( "utf-8" ) ) ;
38+ message . Headers . AcceptCharset . Add ( new StringWithQualityHeaderValue ( "utf-8" ) ) ;
39+
40+ // Explicitly setting content header to avoid issues with some GrahQL servers
41+ message . Content . Headers . ContentType = new MediaTypeHeaderValue ( options . MediaType ) ;
3942
4043 if ( options . DefaultUserAgentRequestHeader != null )
4144 message . Headers . UserAgent . Add ( options . DefaultUserAgentRequestHeader ) ;
You can’t perform that action at this time.
0 commit comments