Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

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.