Example usage for io.vertx.core.http HttpClientOptions setTryUseCompression

List of usage examples for io.vertx.core.http HttpClientOptions setTryUseCompression

Introduction

In this page you can find the example usage for io.vertx.core.http HttpClientOptions setTryUseCompression.

Prototype

public HttpClientOptions setTryUseCompression(boolean tryUseCompression) 

Source Link

Document

Set whether compression is enabled

Usage

From source file:org.apache.servicecomb.transport.rest.client.RestTransportClient.java

License:Apache License

private static HttpClientOptions createHttpClientOptions() {
    HttpClientOptions httpClientOptions = new HttpClientOptions();
    httpClientOptions.setMaxPoolSize(TransportClientConfig.getConnectionMaxPoolSize());
    httpClientOptions.setIdleTimeout(TransportClientConfig.getConnectionIdleTimeoutInSeconds());
    httpClientOptions.setKeepAlive(TransportClientConfig.getConnectionKeepAlive());
    httpClientOptions.setTryUseCompression(TransportClientConfig.getConnectionCompression());

    VertxTLSBuilder.buildHttpClientOptions(SSL_KEY, httpClientOptions);
    return httpClientOptions;
}