public class HttpClientHelperDefaultImpl extends Object implements HttpClientHelper
| Modifier and Type | Field and Description |
|---|---|
static String |
IMAGE |
X_HTTP_HEADER| Constructor and Description |
|---|
HttpClientHelperDefaultImpl() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
addBasicAuthenticationHeader(String login,
String password,
Map<String,String> currentHeaders) |
StxPluginHttpResponse |
doDelete(String service,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doDelete(String service,
Map<String,String> additionalHeaders,
org.apache.http.client.protocol.HttpClientContext context) |
StxPluginHttpResponse |
doGet(String service,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doGet(String service,
Map<String,String> additionalHeaders,
org.apache.http.client.protocol.HttpClientContext context) |
StxPluginHttpResponse |
doPatch(String service,
org.apache.http.HttpEntity httpEntityToPost,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPatch(String service,
Object objectToPost,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPatchInternal(String service,
org.apache.http.HttpEntity entity,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPatchJSON(String service,
String json,
String encoding,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPost(String service,
org.apache.http.HttpEntity httpEntityToPost,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPost(String service,
Object objectToPost,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPostInternal(String service,
org.apache.http.HttpEntity entity,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPostJSON(String service,
String json,
String encoding,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPut(String service,
org.apache.http.HttpEntity httpEntityToPost,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPut(String service,
Object objectToPost,
Map<String,String> additionalHeaders) |
StxPluginHttpResponse |
doPutInternal(String service,
org.apache.http.HttpEntity entity,
Map<String,String> additionalHeaders) |
protected StxPluginHttpResponse |
executeHttpCall(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder,
org.apache.http.client.methods.HttpUriRequest httpRequest) |
int |
getConnectionTimeout() |
protected org.apache.http.impl.client.HttpClientBuilder |
getHttpClientBuilder() |
int |
getReadTimeout() |
boolean |
isIgnoreSslVerification() |
void |
setCheckHostnames(boolean checkHostnames)
In the SSL case, do not check hostnames.
|
void |
setConnectionTimeout(int connectionTimeout) |
void |
setDefaultConnectionTimeout(int connectionTimeout) |
void |
setDefaultReadTimeout(int readTimeout) |
void |
setIgnoreSslVerification(boolean ignoreSslVerification) |
void |
setReadTimeout(int readTimeout) |
void |
setSSLContext(SSLContext sslContext)
Allows to provide this connection with an SSL context.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildAdditionalHttpHeadersFromCustomParameterspublic static final String IMAGE
protected org.apache.http.impl.client.HttpClientBuilder getHttpClientBuilder()
public StxPluginHttpResponse doPost(String service, org.apache.http.HttpEntity httpEntityToPost, Map<String,String> additionalHeaders)
doPost in interface HttpClientHelperpublic StxPluginHttpResponse doPost(String service, Object objectToPost, Map<String,String> additionalHeaders)
doPost in interface HttpClientHelperpublic StxPluginHttpResponse doPostJSON(String service, String json, String encoding, Map<String,String> additionalHeaders)
doPostJSON in interface HttpClientHelperpublic StxPluginHttpResponse doPostInternal(String service, org.apache.http.HttpEntity entity, Map<String,String> additionalHeaders)
public StxPluginHttpResponse doPut(String service, org.apache.http.HttpEntity httpEntityToPost, Map<String,String> additionalHeaders)
doPut in interface HttpClientHelperpublic StxPluginHttpResponse doPut(String service, Object objectToPost, Map<String,String> additionalHeaders)
doPut in interface HttpClientHelperpublic StxPluginHttpResponse doPutInternal(String service, org.apache.http.HttpEntity entity, Map<String,String> additionalHeaders)
public StxPluginHttpResponse doGet(String service, Map<String,String> additionalHeaders)
doGet in interface HttpClientHelperpublic StxPluginHttpResponse doPatch(String service, org.apache.http.HttpEntity httpEntityToPost, Map<String,String> additionalHeaders)
doPatch in interface HttpClientHelperpublic StxPluginHttpResponse doPatch(String service, Object objectToPost, Map<String,String> additionalHeaders)
doPatch in interface HttpClientHelperpublic StxPluginHttpResponse doPatchJSON(String service, String json, String encoding, Map<String,String> additionalHeaders)
doPatchJSON in interface HttpClientHelperpublic StxPluginHttpResponse doPatchInternal(String service, org.apache.http.HttpEntity entity, Map<String,String> additionalHeaders)
public StxPluginHttpResponse doDelete(String service, Map<String,String> additionalHeaders)
doDelete in interface HttpClientHelperpublic StxPluginHttpResponse doDelete(String service, Map<String,String> additionalHeaders, org.apache.http.client.protocol.HttpClientContext context)
doDelete in interface HttpClientHelperpublic StxPluginHttpResponse doGet(String service, Map<String,String> additionalHeaders, org.apache.http.client.protocol.HttpClientContext context)
doGet in interface HttpClientHelperprotected StxPluginHttpResponse executeHttpCall(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder, org.apache.http.client.methods.HttpUriRequest httpRequest)
public int getReadTimeout()
public int getConnectionTimeout()
public boolean isIgnoreSslVerification()
public void setIgnoreSslVerification(boolean ignoreSslVerification)
public static Map<String,String> addBasicAuthenticationHeader(String login, String password, Map<String,String> currentHeaders)
public void setDefaultConnectionTimeout(int connectionTimeout)
setDefaultConnectionTimeout in interface HttpClientHelperpublic void setDefaultReadTimeout(int readTimeout)
setDefaultReadTimeout in interface HttpClientHelperpublic void setConnectionTimeout(int connectionTimeout)
public void setReadTimeout(int readTimeout)
public void setSSLContext(SSLContext sslContext)
HttpClientHelpersetSSLContext in interface HttpClientHelperpublic void setCheckHostnames(boolean checkHostnames)
HttpClientHelpersetCheckHostnames in interface HttpClientHelperCopyright © 2021. All rights reserved.