26 var result =
new HttpClientHandler();
28 result.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
39 request.Headers.Add(
"Accept",
"*/*");
40 request.Headers.Add(
"Accept-Encoding",
"gzip,deflate,*");
49 var client =
new CompressionWebClient(
Timeout);
50 client.Headers.Set(
"Accept",
"*/*");
51 client.Headers.Set(
"Accept-Encoding",
"gzip,deflate,*");
55 private class CompressionWebClient : WebClient
57 private int Timeout {
get;
set; }
59 public CompressionWebClient(
int timeout)
64 protected override WebRequest GetWebRequest(Uri address)
66 var req = base.GetWebRequest(address) as HttpWebRequest;
67 req.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
virtual int Timeout
Gets or sets the Client timeout in milliseconds (0 uses default timeout).
Implements a data portal proxy to relay data portal calls to a remote application server by using htt...
override HttpClientHandler GetHttpClientHandler()
Gets an HttpClientHandler for use in initializing the HttpClient instance.
override void SetHttpRequestHeaders(HttpRequestMessage request)
Override to set headers or other properties of the HttpRequestMessage before it is sent to the server...
override WebClient GetWebClient()
Gets an WebClient object for use in communication with the server.
Implements a data portal proxy to relay data portal calls to a remote application server by using htt...
static bool UseTextSerialization
Gets or sets a value indicating whether to use text/string serialization instead of the default binar...