public class HTTPRequestHandler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HTTPRequestHandler.HTTPRequestResponse
All fields have public accessor, but private mutators.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROXY_HOST |
static String |
PROXY_PASSWORD |
static String |
PROXY_PORT |
static String |
PROXY_USERNAME |
Constructor and Description |
---|
HTTPRequestHandler() |
Modifier and Type | Method and Description |
---|---|
static HTTPRequestHandler.HTTPRequestResponse |
initiateHTTPRequest(String requestURL,
RESTActivityConfigurationBean configBean,
Object inputMessageBody,
Map<String,String> urlParameters,
org.apache.http.client.CredentialsProvider credentialsProvider)
This method is the entry point to the invocation of a remote REST
service.
|
static byte[] |
readFromInputStreamAsBinary(InputStream inputStream)
Worker method that extracts the content of the input stream as binary
data.
|
public static String PROXY_HOST
public static String PROXY_PORT
public static String PROXY_USERNAME
public static String PROXY_PASSWORD
public static HTTPRequestHandler.HTTPRequestResponse initiateHTTPRequest(String requestURL, RESTActivityConfigurationBean configBean, Object inputMessageBody, Map<String,String> urlParameters, org.apache.http.client.CredentialsProvider credentialsProvider)
requestURL
- The URL for the request to be made. This cannot be taken from
the configBean
, because this should be the
complete URL which may be directly used to make the request (
configBean
would only contain the URL signature
associated with the REST activity).configBean
- Configuration of the associated REST activity is passed to
this class as a configuration bean. Settings such as HTTP
method, MIME types for "Content-Type" and "Accept" headers,
etc are taken from the bean.inputMessageBody
- Body of the message to be sent to the server - only needed for
POST and PUT requests; for GET and DELETE it will be
discarded.public static byte[] readFromInputStreamAsBinary(InputStream inputStream) throws IOException
inputStream
- IOException
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.