27 : base(applicationContext, httpClient, options)
36 var result =
new HttpClientHandler();
38 result.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
49 request.Headers.Add(
"Accept",
"*/*");
50 request.Headers.Add(
"Accept-Encoding",
"gzip,deflate,*");
59 var client =
new CompressionWebClient(
Timeout);
60 client.Headers.Set(
"Accept",
"*/*");
61 client.Headers.Set(
"Accept-Encoding",
"gzip,deflate,*");
65#pragma warning disable SYSLIB0014
66 private class CompressionWebClient : WebClient
68 private int Timeout {
get;
set; }
70 public CompressionWebClient(
int timeout) =>
Timeout = timeout;
72 protected override WebRequest GetWebRequest(Uri address)
74 var req = base.GetWebRequest(address) as HttpWebRequest;
75 req.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
81#pragma warning restore SYSLIB0014
Provides consistent context information between the client and server DataPortal objects.
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.
HttpCompressionProxy(ApplicationContext applicationContext, HttpClient httpClient, HttpProxyOptions options)
Creates an instance of the type.
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...
virtual int Timeout
Gets or sets the Client timeout in milliseconds (0 uses default timeout).