Skip navigation links
oracle.stellent.ridc.protocol.http.apache4.impl
Class HttpApache4PostMethod
java.lang.Object
oracle.stellent.ridc.protocol.http.apache4.impl.HttpApache4Method<org.apache.http.client.methods.HttpPost>
oracle.stellent.ridc.protocol.http.apache4.impl.HttpApache4PostMethod
- All Implemented Interfaces:
- RIDCHttpMethod, RIDCHttpPostMethod
-
public class HttpApache4PostMethod
- extends HttpApache4Method<org.apache.http.client.methods.HttpPost>
- implements RIDCHttpPostMethod
Http Post method implementation in Apache 4.x
| Field Summary |
protected List<org.apache.http.NameValuePair> |
m_formData
|
| Methods inherited from class oracle.stellent.ridc.protocol.http.apache4.impl.HttpApache4Method |
addRequestHeader, getResponseBodyAsStream, getResponseHeader, getResponseHeaders, getRidcClient, getStatusCode, getStatusLine, getURI, logResponse, releaseConnection, setCookiePolicy, setFollowRedirects, setParameter, setQueryString, setRequestHeader, setServiceLog |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.stellent.ridc.common.http.RIDCHttpMethod |
addRequestHeader, getResponseBodyAsStream, getResponseHeader, getResponseHeaders, getRidcClient, getStatusCode, getStatusLine, getURI, releaseConnection, setCookiePolicy, setFollowRedirects, setParameter, setQueryString, setRequestHeader, setServiceLog |
m_formData
protected List<org.apache.http.NameValuePair> m_formData
HttpApache4PostMethod
public HttpApache4PostMethod(String url,
HttpApache4Client httpApache4Client)
- Constructor
- Parameters:
url -
httpApache4Client -
setRequestEntity
public void setRequestEntity(String content,
String contentType,
String encoding)
throws UnsupportedEncodingException
- Set request data for POST action
-
- Specified by:
setRequestEntity in interface RIDCHttpPostMethod
-
- Parameters:
content - the content to be posted
contentType - the content type
encoding - the content encoding
- Throws:
UnsupportedEncodingException
setRequestEntity
public void setRequestEntity(List<RIDCHttpPart<?>> multipartParts,
String encoding)
throws IOException
- Set multipart request data for POST action
-
- Specified by:
setRequestEntity in interface RIDCHttpPostMethod
-
- Parameters:
multipartParts - the content "parts" to be posted
encoding -
- Throws:
UnsupportedEncodingException
IOException
addParameter
public void addParameter(String name,
String value)
- Add a parameter to the request
-
- Specified by:
addParameter in interface RIDCHttpPostMethod
-
- Parameters:
name - parameter name
value - parameter value
addLoginFormCredentials
public void addLoginFormCredentials(IdcContext.LoginForm loginForm,
Credentials.BasicCredentials credentials)
throws UnsupportedEncodingException
- Add credentials for a login form
-
- Specified by:
addLoginFormCredentials in interface RIDCHttpPostMethod
-
- Parameters:
loginForm - the login form
credentials - the login credentials
- Throws:
UnsupportedEncodingException
execute
public int execute()
throws IOException
- Description copied from class:
HttpApache4Method
- Execute the request
-
- Specified by:
execute in interface RIDCHttpMethod
- Overrides:
execute in class HttpApache4Method<org.apache.http.client.methods.HttpPost>
-
- Returns:
- status code of the response
- Throws:
IOException
logRequest
protected void logRequest(String logID,
org.apache.http.client.methods.HttpPost method)
-
- Overrides:
logRequest in class HttpApache4Method<org.apache.http.client.methods.HttpPost>
Skip navigation links
Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.