public class HTTPCall<C> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HTTPCall.HTTPMETHOD |
| Modifier and Type | Field and Description |
|---|---|
protected String |
body |
protected HTTPCall.HTTPMETHOD |
method |
static String |
PARAM_EQUALS |
static String |
PARAM_SEPARATOR |
static String |
PARAM_STARTER |
protected String |
path |
protected String |
urlParameters |
static String |
UTF8 |
| Constructor and Description |
|---|
HTTPCall(String path,
HTTPCall.HTTPMETHOD method,
Map<String,String> parameters) |
HTTPCall(String path,
HTTPCall.HTTPMETHOD method,
Map<String,String> parameters,
String body) |
| Modifier and Type | Method and Description |
|---|---|
C |
call(Class<C> clz,
URL url,
String userAgent) |
protected HttpURLConnection |
getConnection(URL url,
String userAgent) |
HTTPCall.HTTPMETHOD |
getMethod() |
protected String |
getParametersDataString(Map<String,String> parameters) |
String |
getPath() |
protected StringBuilder |
getStringBuilder(InputStream inputStream) |
String |
getUrlParameters() |
public static final String PARAM_STARTER
public static final String PARAM_EQUALS
public static final String PARAM_SEPARATOR
public static final String UTF8
protected final String path
protected final HTTPCall.HTTPMETHOD method
protected final String urlParameters
protected final String body
public HTTPCall(String path, HTTPCall.HTTPMETHOD method, Map<String,String> parameters, String body) throws UnsupportedEncodingException
path - method - requestProperties - UnsupportedEncodingExceptionpublic HTTPCall(String path, HTTPCall.HTTPMETHOD method, Map<String,String> parameters) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected String getParametersDataString(Map<String,String> parameters) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic String getPath()
public HTTPCall.HTTPMETHOD getMethod()
public String getUrlParameters()
protected HttpURLConnection getConnection(URL url, String userAgent) throws Exception
Exceptionprotected StringBuilder getStringBuilder(InputStream inputStream) throws IOException
IOExceptionCopyright © 2017. All Rights Reserved.