Forum Xamarin Cross Platform with Xamarin

HttpClient Headers bugs (iOS)

EdoardoIEdoardoI IEMember


I was optimistic today and started to do some tests with HttpClient in a PCL that is used by an iOS project.
It seems there are very few headers going through a request. Also the User-Agent string gets modified with extra commas on every whitespace.
I tried all combinations of DefaultRequestHeaders methods on the HttpClient instance for the GetAsync call and also using Headers with HttpRequestMessage and HttpClient SendAsync.

All headers are ignored.


  • EdoardoIEdoardoI IEMember

    I figured it out. Charles Proxy doesn't show all headers!
    On the other side, Headers.TryAddWithoutValidation solve all other problems.

Sign In or Register to comment.