public class HttpApache4PostMethod extends HttpApache4Method<org.apache.http.client.methods.HttpPost> implements RIDCHttpPostMethod
| Modifier and Type | Field and Description |
|---|---|
protected List<org.apache.http.NameValuePair> |
m_formData |
httpClient, method, requestConfig, serviceLog| Constructor and Description |
|---|
HttpApache4PostMethod(String url, HttpApache4Client httpApache4Client)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLoginFormCredentials(IdcContext.LoginForm loginForm, Credentials.BasicCredentials credentials)
Add credentials for a login form
|
void |
addParameter(String name, String value)
Add a parameter to the request
|
int |
execute()
Execute the request
|
protected void |
logRequest(String logID, org.apache.http.client.methods.HttpPost method) |
void |
setRequestEntity(List<RIDCHttpPart<?>> multipartParts, String encoding)
Set multipart request data for POST action
|
void |
setRequestEntity(String content, String contentType, String encoding)
Set request data for POST action
|
addRequestHeader, getResponseBodyAsStream, getResponseHeader, getResponseHeaders, getRidcClient, getStatusCode, getStatusLine, getURI, logResponse, releaseConnection, setCookiePolicy, setFollowRedirects, setParameter, setQueryString, setRequestConfig, setRequestHeader, setServiceLogclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddRequestHeader, getResponseBodyAsStream, getResponseHeader, getResponseHeaders, getRidcClient, getStatusCode, getStatusLine, getURI, releaseConnection, setCookiePolicy, setFollowRedirects, setParameter, setQueryString, setRequestConfig, setRequestHeader, setServiceLogprotected List<org.apache.http.NameValuePair> m_formData
public HttpApache4PostMethod(String url, HttpApache4Client httpApache4Client)
url -httpApache4Client -public void setRequestEntity(String content, String contentType, String encoding) throws UnsupportedEncodingException
setRequestEntity in interface RIDCHttpPostMethodcontent - the content to be postedcontentType - the content typeencoding - the content encodingUnsupportedEncodingExceptionpublic void setRequestEntity(List<RIDCHttpPart<?>> multipartParts, String encoding) throws IOException
setRequestEntity in interface RIDCHttpPostMethodmultipartParts - the content "parts" to be postedencoding -UnsupportedEncodingExceptionIOExceptionpublic void addParameter(String name, String value)
addParameter in interface RIDCHttpPostMethodname - parameter namevalue - parameter valuepublic void addLoginFormCredentials(IdcContext.LoginForm loginForm, Credentials.BasicCredentials credentials) throws UnsupportedEncodingException
addLoginFormCredentials in interface RIDCHttpPostMethodloginForm - the login formcredentials - the login credentialsUnsupportedEncodingException
public int execute()
throws IOException
HttpApache4Methodexecute in interface RIDCHttpMethodexecute in class HttpApache4Method<org.apache.http.client.methods.HttpPost>IOExceptionprotected void logRequest(String logID, org.apache.http.client.methods.HttpPost method)
logRequest in class HttpApache4Method<org.apache.http.client.methods.HttpPost>