@NotThreadSafe public class HttpPost extends HttpEntityEnclosingRequestBase
The HTTP POST method is defined in section 9.5 of RFC2616:
The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:
- Annotation of existing resources
- Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles
- Providing a block of data, such as the result of submitting a form, to a data-handling process
- Extending a database through an append operation
Modifier and Type | Field and Description |
---|---|
static String |
METHOD_NAME |
Constructor and Description |
---|
HttpPost() |
HttpPost(String uri) |
HttpPost(URI uri) |
Modifier and Type | Method and Description |
---|---|
String |
getMethod()
Returns the HTTP method this request uses, such as
GET ,
PUT , POST , or other. |
clone, expectContinue, getEntity, setEntity
abort, getProtocolVersion, getRequestLine, getURI, isAborted, setConnectionRequest, setReleaseTrigger, setURI
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
public static final String METHOD_NAME
public HttpPost()
public HttpPost(URI uri)
public HttpPost(String uri)
IllegalArgumentException
- if the uri is invalid.public String getMethod()
HttpUriRequest
GET
,
PUT
, POST
, or other.getMethod
in interface HttpUriRequest
getMethod
in class HttpRequestBase
Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.