Class HttpUtils
java.lang.Object
org.apache.unomi.shell.migration.utils.HttpUtils
- Author:
- dgaillard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
executeDeleteRequest
(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, Map<String, String> headers) static String
executeGetRequest
(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, Map<String, String> headers) static String
executeHeadRequest
(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, Map<String, String> headers) static String
executePostRequest
(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, String jsonData, Map<String, String> headers) static String
executePutRequest
(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, String jsonData, Map<String, String> headers) static org.apache.http.impl.client.CloseableHttpClient
initHttpClient
(boolean trustAllCertificates, org.apache.http.client.CredentialsProvider credentialsProvider)
-
Constructor Details
-
HttpUtils
public HttpUtils()
-
-
Method Details
-
initHttpClient
public static org.apache.http.impl.client.CloseableHttpClient initHttpClient(boolean trustAllCertificates, org.apache.http.client.CredentialsProvider credentialsProvider) throws IOException - Throws:
IOException
-
executeGetRequest
public static String executeGetRequest(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, Map<String, String> headers) throws IOException- Throws:
IOException
-
executeHeadRequest
public static String executeHeadRequest(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, Map<String, String> headers) throws IOException- Throws:
IOException
-
executeDeleteRequest
public static String executeDeleteRequest(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, Map<String, String> headers) throws IOException- Throws:
IOException
-
executePostRequest
public static String executePostRequest(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, String jsonData, Map<String, String> headers) throws IOException- Throws:
IOException
-
executePutRequest
public static String executePutRequest(org.apache.http.impl.client.CloseableHttpClient httpClient, String url, String jsonData, Map<String, String> headers) throws IOException- Throws:
IOException
-