public class HttpPost extends HttpEntityEnclosingRequestBase
HTTP POST方法在RFC2616的第9.5节中定义 :
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 |
headergroup, params| Modifier and Type | Method and Description |
|---|---|
String |
getMethod()
返回该请求使用HTTP方法,如
GET ,
PUT ,
POST ,或其他。
|
clone, expectContinue, getEntity, setEntitygetConfig, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toStringabort, completed, isAborted, reset, setCancellable, setConnectionRequest, setReleaseTriggeraddHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamsequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRequestLineaddHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, getProtocolVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamsabort, isAbortedpublic static final String METHOD_NAME
public HttpPost()
public HttpPost(URI uri)
public HttpPost(String uri)
IllegalArgumentException - 如果uri无效。
public String getMethod()
HttpUriRequest复制
GET ,
PUT ,
POST ,或其他。
getMethod在界面
HttpUriRequest
getMethod在
HttpRequestBase
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.