public class HttpUtils extends Object
| Constructor and Description |
|---|
HttpUtils() |
| Modifier and Type | Method and Description |
|---|---|
static HttpURLConnection |
createHttpConnection(URL endpointUrl,
String httpMethod,
Map<String,String> headers) |
static HttpURLConnection |
createHttpConnection(URL endpointUrl,
String httpMethod,
Map<String,String> headers,
int connectTimeoutMs,
int readTimeoutMs) |
static String |
executeHttpRequest(HttpURLConnection connection) |
static String |
invokeHttpRequest(URL endpointUrl,
String httpMethod,
Map<String,String> headers,
String requestBody)
Makes a http request to the specified endpoint
|
static String |
urlEncode(String url,
boolean keepPathSlash) |
public static String invokeHttpRequest(URL endpointUrl, String httpMethod, Map<String,String> headers, String requestBody)
public static String executeHttpRequest(HttpURLConnection connection)
public static HttpURLConnection createHttpConnection(URL endpointUrl, String httpMethod, Map<String,String> headers)
public static HttpURLConnection createHttpConnection(URL endpointUrl, String httpMethod, Map<String,String> headers, int connectTimeoutMs, int readTimeoutMs)
Copyright © 2021. All rights reserved.