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, setServiceLog
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addRequestHeader, getResponseBodyAsStream, getResponseHeader, getResponseHeaders, getRidcClient, getStatusCode, getStatusLine, getURI, releaseConnection, setCookiePolicy, setFollowRedirects, setParameter, setQueryString, setRequestConfig, setRequestHeader, setServiceLog
protected 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 RIDCHttpPostMethod
content
- the content to be postedcontentType
- the content typeencoding
- the content encodingUnsupportedEncodingException
public void setRequestEntity(List<RIDCHttpPart<?>> multipartParts, String encoding) throws IOException
setRequestEntity
in interface RIDCHttpPostMethod
multipartParts
- the content "parts" to be postedencoding
- UnsupportedEncodingException
IOException
public void addParameter(String name, String value)
addParameter
in interface RIDCHttpPostMethod
name
- parameter namevalue
- parameter valuepublic void addLoginFormCredentials(IdcContext.LoginForm loginForm, Credentials.BasicCredentials credentials) throws UnsupportedEncodingException
addLoginFormCredentials
in interface RIDCHttpPostMethod
loginForm
- the login formcredentials
- the login credentialsUnsupportedEncodingException
public int execute() throws IOException
HttpApache4Method
execute
in interface RIDCHttpMethod
execute
in class HttpApache4Method<org.apache.http.client.methods.HttpPost>
IOException
protected void logRequest(String logID, org.apache.http.client.methods.HttpPost method)
logRequest
in class HttpApache4Method<org.apache.http.client.methods.HttpPost>