public class HttpClientFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpClientFactory.CustomRedirectStrategy |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
ssl_store_path |
java.lang.String |
user_agent |
Constructor and Description |
---|
HttpClientFactory(java.lang.String user_agent)
Initialize a new client factory.
|
HttpClientFactory(java.lang.String user_agent,
java.lang.String ssl_store_path)
Initialize a new client factory with an additional key store to trust for SSL connections.
|
Modifier and Type | Method and Description |
---|---|
protected java.security.KeyStore |
getKeyStore() |
org.apache.http.client.HttpClient |
getNewApacheHttpClient(boolean customssl,
boolean tls_only,
boolean disguise_app)
Create a new HttpClient.
|
protected java.lang.Class<?> |
getSocketFactoryClass(boolean tls_only) |
public java.lang.String user_agent
public java.lang.String ssl_store_path
public HttpClientFactory(java.lang.String user_agent)
user_agent
- The User-Agent header to be sent.public HttpClientFactory(java.lang.String user_agent, java.lang.String ssl_store_path)
user_agent
- The User-Agent header to be sent.ssl_store_path
- The path to the .bks storeprotected java.security.KeyStore getKeyStore() throws java.security.KeyStoreException, java.io.IOException, java.security.cert.CertificateException, java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.io.IOException
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
protected java.lang.Class<?> getSocketFactoryClass(boolean tls_only)
public org.apache.http.client.HttpClient getNewApacheHttpClient(boolean customssl, boolean tls_only, boolean disguise_app)
tls_only
- If this is true, only TLS v1 and newer will be used, SSLv3 will be disabled.
We highly recommend to set this to true, if possible. This is currently a
no-op on the default implementation and only used in the Android
implementation!