Class HttpUtils
- java.lang.Object
-
- org.apache.unomi.shell.migration.utils.HttpUtils
-
public class HttpUtils extends Object
- Author:
- dgaillard
-
-
Constructor Summary
Constructors Constructor Description HttpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
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
-
-