...
Code Block | ||
---|---|---|
| ||
private fun setPolicies(service: Any, trustManagers: Array<TrustManager>, keyManagers: Array<KeyManager>) { val conduit: HTTPConduit = ClientProxy.getClient(service).getConduit() as HTTPConduit // Set the "Expect: 100-continue" header ClientProxy.getClient(service).requestContext.put(PROTOCOL_HEADERS, mapOf("Expect" to listOf("100-continue"))) val httpPolicy = HTTPClientPolicy() httpPolicy.connectionTimeout = 36000 // Enable "chunked encoding" support httpPolicy.isAllowChunking = true httpPolicy.receiveTimeout = 32000 val tlsParameters = TLSClientParameters() tlsParameters.keyManagers = keyManagers tlsParameters.trustManagers = trustManagers conduit.tlsClientParameters = tlsParameters conduit.client = httpPolicy } |
...