|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.HttpMethodBase | +--org.apache.commons.httpclient.methods.GetMethod | +--org.apache.commons.httpclient.methods.PostMethod
POST Method.
Fields inherited from class org.apache.commons.httpclient.methods.GetMethod |
fileData, memoryData, tempDir, tempFile, useDisk |
Fields inherited from class org.apache.commons.httpclient.HttpMethodBase |
USER_AGENT |
Constructor Summary | |
PostMethod()
No-arg constructor. |
|
PostMethod(java.lang.String path)
Path-setting constructor. |
|
PostMethod(java.lang.String path,
java.lang.String tempDir)
Constructor. |
|
PostMethod(java.lang.String path,
java.lang.String tempDir,
java.lang.String tempFile)
Constructor. |
Method Summary | |
void |
addParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Override method of HttpMethodBase
to throw IllegalStateException if
my request body has already been generated. |
protected void |
addRequestHeaders(HttpState state,
HttpConnection conn)
Override method of HttpMethodBase
to also add Content-Type header
when appropriate. |
protected java.lang.String |
generateRequestBody(java.util.HashMap params)
|
java.lang.String |
getName()
Returns "POST". |
protected int |
getRequestContentLength()
Override method of HttpMethodBase
to return the length of the request body. |
void |
recycle()
Override method of HttpMethodBase
to clear my request body. |
void |
removeParameter(java.lang.String paramName)
Override method of HttpMethodBase
to throw IllegalStateException if
my request body has already been generated. |
void |
removeParameter(java.lang.String paramName,
java.lang.String paramValue)
Override method of HttpMethodBase
to throw IllegalStateException if
my request body has already been generated. |
void |
setParameter(java.lang.String parameterName,
java.lang.String parameterValue)
Override method of HttpMethodBase
to throw IllegalStateException if
my request body has already been generated. |
protected boolean |
writeRequestBody(HttpState state,
HttpConnection conn)
Override method of HttpMethodBase
to write request parameters as the
request body. |
Methods inherited from class org.apache.commons.httpclient.methods.GetMethod |
getFileData, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getTempDir, getTempFile, getUseDisk, readResponseBody, setFileData, setTempDir, setTempFile, setUseDisk |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PostMethod()
public PostMethod(java.lang.String path)
path
- the path to requestpublic PostMethod(java.lang.String path, java.lang.String tempDir)
path
- the path to requesttempDir
- directory to store temp files inpublic PostMethod(java.lang.String path, java.lang.String tempDir, java.lang.String tempFile)
path
- the path to requesttempDir
- directory to store temp files intempFile
- file to store temporary data inMethod Detail |
public java.lang.String getName()
getName
in class GetMethod
public void recycle()
HttpMethodBase
to clear my request body.recycle
in class GetMethod
public void setParameter(java.lang.String parameterName, java.lang.String parameterValue)
HttpMethodBase
to throw IllegalStateException
if
my request body has already been generated.java.lang.IllegalStateException
- if my request body has already been generated.public void addParameter(java.lang.String parameterName, java.lang.String parameterValue)
HttpMethodBase
to throw IllegalStateException
if
my request body has already been generated.java.lang.IllegalStateException
- if my request body has already been generated.public void removeParameter(java.lang.String paramName)
HttpMethodBase
to throw IllegalStateException
if
my request body has already been generated.java.lang.IllegalStateException
- if my request body has already been generated.public void removeParameter(java.lang.String paramName, java.lang.String paramValue)
HttpMethodBase
to throw IllegalStateException
if
my request body has already been generated.java.lang.IllegalStateException
- if my request body has already been generated.protected void addRequestHeaders(HttpState state, HttpConnection conn) throws java.io.IOException, HttpException
HttpMethodBase
to also add Content-Type header
when appropriate.addRequestHeaders
in class HttpMethodBase
org.apache.commons.httpclient.HttpMethodBase
state
- the client stateconn
- the HttpConnection
the headers will eventually be written toHttpMethodBase.writeRequestHeaders(org.apache.commons.httpclient.HttpState, org.apache.commons.httpclient.HttpConnection)
protected boolean writeRequestBody(HttpState state, HttpConnection conn) throws java.io.IOException, HttpException
HttpMethodBase
to write request parameters as the
request body.writeRequestBody
in class HttpMethodBase
org.apache.commons.httpclient.HttpMethodBase
protected int getRequestContentLength()
HttpMethodBase
to return the length of the request body.
Once this method has been invoked,
the request parameters cannot be altered
until I am recycled
.getRequestContentLength
in class HttpMethodBase
org.apache.commons.httpclient.HttpMethodBase
protected java.lang.String generateRequestBody(java.util.HashMap params)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |