I'm dealing with a third-party API who's calls require the Content-Type header on GET method requests, but return an error response when the header collection includes "Content-Length". The only way to add the Content-Type header is to add a class that inherits/implements the IHttpContent interface (I was using HttpStringContent with string.empty as the string content). The problem, is that adding a blank HttpStringContent adds ContentLength. Even though the value of that header is '0', their server gets super angry. Content-Length doesn't show up in the header collection while i'm debugging, but when i run my application through Postman or Burp Proxy, the Content-Length header is there. I've tried blindly using .Remove to get rid of the Content-Length header but that doesn't work.
I've seen StackOverflow questions about adding Content-Length, but that's not what i need/want. Is there any way to have the Content-Type header in a GET request, without having the Content-Length header? Or.... is there a way to remove the Content-Length header? I've tried creating my own content class that implements IHttpContent, but i'm getting stuck with the implementation of IAsyncOperationWithProgress.
I understand this isn't standard, which is why i'm having so much difficulty with this. I've also tried Flurl which also didn't add the Content-Type header.
TL;DR: Content-Type (application/json) is mandatory, and Content-Length results (even though it's 0) in API errors. How do i add Content-Type to Windows.Web.Http.HttpRequestMessage/HttpClient without Content-Length?
EDIT: for clarification this is a UWP application