0
votes

How to get Gzip and basic auth working in a HTTP request from Silverlight 5? I'm using HttpClient to send requests.

In browser stack mode there is support for gzip but I cannot add basic auth (gives NotImplementedException on filling httpClient.DefaultRequestHeaders.Authorization)

In Client stack mode there is support for basic auth (httpClient.DefaultRequestHeaders.Authorization) but not for gzip (gives error The 'Accept-Encoding' header cannot be modified directly' when using httpClient.DefaultRequestHeaders.AcceptEncoding.Add)

1

1 Answers

0
votes

found a way using HttpClient and Google Protocol buffers (so no gzip): https://github.com/bertt/WebApiWithGpb/blob/master/WebApiWithGpb.Core/SuperClient.cs