How do I not exclude charset in Content-Type when using HttpClient?
问题 I am attempting to use HttpClient in a .net core project to make a GET request to a REST service that accepts/returns JSON. I don't control the external service. No matter how I try, I can't figure out to set the Content-Type header to application/json only . When I use client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); it sends in the HTTP GET request: Content-Type: application/json; charset=utf-8 However, this particular service does not work