Package play.api.libs.ws.ning

Examples of play.api.libs.ws.ning.NingAsyncHttpClientConfigBuilder


    private final NingWSClient client;

    @Inject
    public NingWSAPI(WSClientConfig clientConfig, ApplicationLifecycle lifecycle) {
        client = new NingWSClient(
                new NingAsyncHttpClientConfigBuilder(clientConfig).build()
        );
        lifecycle.addStopHook(new Callable<F.Promise<Void>>() {
            @Override
            public F.Promise<Void> call() throws Exception {
                client.close();
View Full Code Here


                    none, // compressionEnabled
                    none, // acceptAnyCertificate
                    noneSSLConfig);

            // Build a secure config out of the client config:
            NingAsyncHttpClientConfigBuilder secureBuilder = new NingAsyncHttpClientConfigBuilder(clientConfig);
            AsyncHttpClientConfig secureDefaults = secureBuilder.build();

            // You can directly use the builder for specific options once you have secure TLS defaults...
           AsyncHttpClientConfig customConfig = new AsyncHttpClientConfig.Builder(secureDefaults)
                            .setProxyServer(new com.ning.http.client.ProxyServer("127.0.0.1", 38080))
                            .setCompressionEnabled(true)
View Full Code Here

TOP

Related Classes of play.api.libs.ws.ning.NingAsyncHttpClientConfigBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.