public class HttpUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ZIP_BUFFER_SIZE |
| Constructor and Description |
|---|
HttpUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCredentials(org.apache.commons.httpclient.HttpClient client,
VariableSpace space,
String hostname,
String port,
String webAppName,
String username,
String password) |
static void |
addProxy(org.apache.commons.httpclient.HttpClient client,
VariableSpace space,
String hostname,
String proxyHostname,
String proxyPort,
String nonProxyHosts) |
static String |
constructUrl(VariableSpace space,
String hostname,
String port,
String webAppName,
String serviceAndArguments)
Returns http GET request string using specified parameters.
|
static String |
constructUrl(VariableSpace space,
String hostname,
String port,
String webAppName,
String serviceAndArguments,
boolean isSecure) |
static String |
decodeBase64ZippedString(String loggingString64)
Base 64 decode, unzip and extract text using
Const.XML_ENCODING predefined charset value for byte-wise
multi-byte character handling. |
static String |
encodeBase64ZippedString(String in) |
static int |
execMethod(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethod method) |
static String |
execService(VariableSpace space,
String hostname,
String port,
String webAppName,
String serviceAndArguments,
String username,
String password,
String proxyHostname,
String proxyPort,
String nonProxyHosts) |
static String |
execService(VariableSpace space,
String hostname,
String port,
String webAppName,
String serviceAndArguments,
String username,
String password,
String proxyHostname,
String proxyPort,
String nonProxyHosts,
boolean isSecure) |
static org.apache.commons.httpclient.methods.PostMethod |
execService(VariableSpace space,
String hostname,
String port,
String webAppName,
String urlString,
String username,
String password,
String proxyHostname,
String proxyPort,
String nonProxyHosts,
Iterable<org.apache.commons.httpclient.Header> headers,
Map<String,Object> parameters,
Map<String,String> arguments) |
static String |
getPortSpecification(VariableSpace space,
String port) |
public static final int ZIP_BUFFER_SIZE
public static org.apache.commons.httpclient.methods.PostMethod execService(VariableSpace space, String hostname, String port, String webAppName, String urlString, String username, String password, String proxyHostname, String proxyPort, String nonProxyHosts, Iterable<org.apache.commons.httpclient.Header> headers, Map<String,Object> parameters, Map<String,String> arguments) throws Exception
Exceptionpublic static String execService(VariableSpace space, String hostname, String port, String webAppName, String serviceAndArguments, String username, String password, String proxyHostname, String proxyPort, String nonProxyHosts, boolean isSecure) throws Exception
Exceptionpublic static String execService(VariableSpace space, String hostname, String port, String webAppName, String serviceAndArguments, String username, String password, String proxyHostname, String proxyPort, String nonProxyHosts) throws Exception
Exceptionpublic static int execMethod(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethod method)
throws Exception
Exceptionpublic static String constructUrl(VariableSpace space, String hostname, String port, String webAppName, String serviceAndArguments) throws UnsupportedEncodingException
space - hostname - port - webAppName - serviceAndArguments - UnsupportedEncodingExceptionpublic static String constructUrl(VariableSpace space, String hostname, String port, String webAppName, String serviceAndArguments, boolean isSecure) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String getPortSpecification(VariableSpace space, String port)
public static void addProxy(org.apache.commons.httpclient.HttpClient client,
VariableSpace space,
String hostname,
String proxyHostname,
String proxyPort,
String nonProxyHosts)
public static void addCredentials(org.apache.commons.httpclient.HttpClient client,
VariableSpace space,
String hostname,
String port,
String webAppName,
String username,
String password)
public static String decodeBase64ZippedString(String loggingString64) throws IOException
Const.XML_ENCODING predefined charset value for byte-wise
multi-byte character handling.loggingString64 - base64 zip archive string representationIOExceptionpublic static String encodeBase64ZippedString(String in) throws IOException
IOException