Class HttpService
java.lang.Object
io.jans.configapi.core.test.service.HttpService
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.conn.routing.HttpRoutePlannerbuildDefaultRoutePlanner(String proxy) org.apache.http.conn.routing.HttpRoutePlannerbuildDefaultRoutePlanner(String hostname, int port, String scheme) constructServerUrl(jakarta.servlet.http.HttpServletRequest request) voidconsume(org.apache.http.HttpResponse httpResponse) convertEntityToString(byte[] responseBytes) convertEntityToString(byte[] responseBytes, String charsetName) convertEntityToString(byte[] responseBytes, Charset charset) encodeBase64(String value) io.jans.model.net.HttpServiceResponseexecuteGet(String requestUri, Map<String, String> headers) io.jans.model.net.HttpServiceResponseio.jans.model.net.HttpServiceResponseexecuteGet(org.apache.http.client.HttpClient httpClient, String requestUri) io.jans.model.net.HttpServiceResponseexecuteGet(org.apache.http.client.HttpClient httpClient, String requestUri, Map<String, String> headers, Map<String, String> parameters) io.jans.model.net.HttpServiceResponseexecutePost(String uri, String authCode, String postData, org.apache.http.entity.ContentType contentType, String authType) io.jans.model.net.HttpServiceResponseexecutePost(org.apache.http.client.HttpClient httpClient, String uri, String authCode, String postData, org.apache.http.entity.ContentType contentType) io.jans.model.net.HttpServiceResponseexecutePost(org.apache.http.client.HttpClient httpClient, String uri, String authCode, Map<String, String> headers, String postData) io.jans.model.net.HttpServiceResponseexecutePost(org.apache.http.client.HttpClient httpClient, String uri, String authCode, Map<String, String> headers, String postData, org.apache.http.entity.ContentType contentType, String authType) org.apache.http.impl.client.CloseableHttpClientorg.apache.http.impl.client.CloseableHttpClientgetHttpsClient(String trustStorePath, String trustStorePassword) org.apache.http.impl.client.CloseableHttpClientgetHttpsClient(String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword) org.apache.http.impl.client.CloseableHttpClientgetHttpsClient(org.apache.http.client.config.RequestConfig requestConfig) org.apache.http.impl.client.CloseableHttpClientgetHttpsClient(org.apache.http.client.config.RequestConfig requestConfig, org.apache.http.conn.routing.HttpRoutePlanner routerPlanner) org.apache.http.impl.client.CloseableHttpClientgetHttpsClient(org.apache.http.conn.routing.HttpRoutePlanner routerPlanner) org.apache.http.impl.client.CloseableHttpClientbyte[]getResponseContent(org.apache.http.HttpResponse httpResponse) voidinit()booleanisContentTypeXml(org.apache.http.HttpResponse httpResponse) booleanisResponseStastusCodeOk(org.apache.http.HttpResponse httpResponse) booleanisResponseStatusCodeOk(org.apache.http.HttpResponse httpResponse)
-
Field Details
-
log
protected transient org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
HttpService
public HttpService()
-
-
Method Details
-
init
@PostConstruct public void init() -
getHttpsClientTrustAll
public org.apache.http.impl.client.CloseableHttpClient getHttpsClientTrustAll() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException -
getHttpsClient
public org.apache.http.impl.client.CloseableHttpClient getHttpsClient() -
getHttpsClient
public org.apache.http.impl.client.CloseableHttpClient getHttpsClient(org.apache.http.client.config.RequestConfig requestConfig) -
getHttpsClient
public org.apache.http.impl.client.CloseableHttpClient getHttpsClient(org.apache.http.conn.routing.HttpRoutePlanner routerPlanner) -
getHttpsClient
public org.apache.http.impl.client.CloseableHttpClient getHttpsClient(org.apache.http.client.config.RequestConfig requestConfig, org.apache.http.conn.routing.HttpRoutePlanner routerPlanner) -
getHttpsClient
public org.apache.http.impl.client.CloseableHttpClient getHttpsClient(String trustStorePath, String trustStorePassword) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException -
getHttpsClient
public org.apache.http.impl.client.CloseableHttpClient getHttpsClient(String trustStorePath, String trustStorePassword, String keyStorePath, String keyStorePassword) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, CertificateException, IOException, UnrecoverableKeyException -
executePost
-
executePost
-
executePost
-
executePost
-
encodeBase64
-
encodeUrl
-
executeGet
-
executeGet
-
executeGet
-
executeGet
public io.jans.model.net.HttpServiceResponse executeGet(org.apache.http.client.HttpClient httpClient, String requestUri) -
getResponseContent
- Throws:
IOException
-
consume
- Throws:
IOException
-
convertEntityToString
-
convertEntityToString
-
convertEntityToString
public String convertEntityToString(byte[] responseBytes, String charsetName) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
isResponseStastusCodeOk
public boolean isResponseStastusCodeOk(org.apache.http.HttpResponse httpResponse) -
isResponseStatusCodeOk
public boolean isResponseStatusCodeOk(org.apache.http.HttpResponse httpResponse) -
isContentTypeXml
public boolean isContentTypeXml(org.apache.http.HttpResponse httpResponse) -
constructServerUrl
-
buildDefaultRoutePlanner
-
buildDefaultRoutePlanner
-