public class HTTPCall extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HTTPCall.HTTPMETHOD |
| Modifier and Type | Field and Description |
|---|---|
protected String |
address |
protected boolean |
gCubeTargetService
When the target service is a gCube Service it adds the HTTP header
to provide gCube authorization token and/or scope
|
protected Map<String,String> |
headers |
static String |
PARAM_EQUALS |
static String |
PARAM_SEPARATOR |
static String |
PARAM_STARTER |
static String |
PATH_SEPARATOR |
protected static String |
USER_AGENT_KEY |
protected static String |
USER_AGENT_NAME |
protected String |
userAgent |
static String |
UTF8 |
| Modifier | Constructor and Description |
|---|---|
|
HTTPCall(String address) |
protected |
HTTPCall(String address,
String userAgent) |
protected static final String USER_AGENT_KEY
protected static final String USER_AGENT_NAME
public static final String PATH_SEPARATOR
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 address
protected final String userAgent
protected boolean gCubeTargetService
public HTTPCall(String address)
public boolean isgCubeTargetService()
public void setgCubeTargetService(boolean gCubeTargetService)
protected String getParametersDataString(Map<String,String> parameters) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected URL getURL(String address, String path, String urlParameters) throws MalformedURLException
MalformedURLExceptionprotected URL getURL(String urlString) throws MalformedURLException
MalformedURLExceptionprotected HttpURLConnection getConnection(String path, String urlParameters, HTTPCall.HTTPMETHOD method, String body, InputStream inputStream, String contentType) throws Exception
Exceptionprotected HttpURLConnection getConnection(URL url, HTTPCall.HTTPMETHOD method, String body, InputStream inputStream, String contentType) throws Exception
Exceptionprotected StringBuilder getStringBuilder(InputStream inputStream) throws IOException
IOExceptionpublic String call(String path, HTTPCall.HTTPMETHOD method, Map<String,String> parameters, String contentType)
public String call(String path, HTTPCall.HTTPMETHOD method, String body, String contentType)
public String call(String path, HTTPCall.HTTPMETHOD method, Map<String,String> parameters, String body, String contentType)
public String call(String path, HTTPCall.HTTPMETHOD method, InputStream inputStream, Map<String,String> parameters, String contentType)
Copyright © 2019. All Rights Reserved.