public class Http extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Http.RequestMethod |
Modifier and Type | Field and Description |
---|---|
private Configuration |
configuration |
private SSLSocketFactory |
sslSocketFactory |
Constructor and Description |
---|
Http(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
String |
authorizationHeader() |
private HttpURLConnection |
buildConnection(Http.RequestMethod requestMethod,
String urlString) |
void |
delete(String url) |
private String |
formatSanitizeBodyForLog(String body) |
NodeWrapper |
get(String url) |
private String |
getCurrentTime() |
private SSLSocketFactory |
getSSLSocketFactory() |
private NodeWrapper |
httpRequest(Http.RequestMethod requestMethod,
String url) |
private NodeWrapper |
httpRequest(Http.RequestMethod requestMethod,
String url,
String postBody) |
private static boolean |
isErrorCode(int responseCode) |
NodeWrapper |
post(String url) |
NodeWrapper |
post(String url,
Request request) |
NodeWrapper |
post(String url,
String request) |
NodeWrapper |
put(String url) |
NodeWrapper |
put(String url,
Request request) |
static void |
throwExceptionIfErrorStatusCode(int statusCode,
String message) |
private volatile SSLSocketFactory sslSocketFactory
private Configuration configuration
public Http(Configuration configuration)
public void delete(String url)
public NodeWrapper get(String url)
public NodeWrapper post(String url)
public NodeWrapper post(String url, Request request)
public NodeWrapper post(String url, String request)
public NodeWrapper put(String url)
public NodeWrapper put(String url, Request request)
private NodeWrapper httpRequest(Http.RequestMethod requestMethod, String url)
private NodeWrapper httpRequest(Http.RequestMethod requestMethod, String url, String postBody)
private String getCurrentTime()
private SSLSocketFactory getSSLSocketFactory()
private HttpURLConnection buildConnection(Http.RequestMethod requestMethod, String urlString) throws IOException
IOException
public static void throwExceptionIfErrorStatusCode(int statusCode, String message)
private static boolean isErrorCode(int responseCode)
public String authorizationHeader()
Copyright © 2013-2017. All Rights Reserved.