public class HttpOptions extends HttpRequestBase
HTTP OPTIONS方法在RFC2616的 9.2节中定义 :
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
| Modifier and Type | Field and Description |
|---|---|
static String |
METHOD_NAME |
headergroup, params| Constructor and Description |
|---|
HttpOptions() |
HttpOptions(String uri) |
HttpOptions(URI uri) |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAllowedMethods(HttpResponse response) |
String |
getMethod()
返回该请求使用HTTP方法,如
GET ,
PUT ,
POST ,或其他。
|
getConfig, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toStringabort, clone, 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, waitabort, isAbortedaddHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParamspublic static final String METHOD_NAME
public HttpOptions()
public HttpOptions(URI uri)
public HttpOptions(String uri)
IllegalArgumentException - 如果uri无效。
public String getMethod()
HttpUriRequest复制
GET ,
PUT ,
POST ,或其他。
getMethod在界面
HttpUriRequest
getMethod在
HttpRequestBase
public Set<String> getAllowedMethods(HttpResponse response)
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.