org.apache.http.client.methods

## Class HttpOptions

- java.lang.Object
- - org.apache.http.message.AbstractHttpMessage
  - - org.apache.http.client.methods.AbstractExecutionAwareRequest
    - - org.apache.http.client.methods.HttpRequestBase
      - - org.apache.http.client.methods.HttpOptions

- All Implemented Interfaces:
    Cloneable ， AbortableHttpRequest ， Configurable ， HttpExecutionAware ， HttpUriRequest ， HttpMessage ， HttpRequest

      public class HttpOptions
      extends HttpRequestBase

  HTTP选项方法。

  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.

  从以下版本开始：
    4

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `METHOD_NAME`

    - ### Fields inherited from class org.apache.http.message.AbstractHttpMessage

      `headergroup, params`

  - ### 构造方法摘要

    构造方法
    Constructor and Description
    `HttpOptions()`
    `HttpOptions(String uri)`
    `HttpOptions(URI uri)`

  - ### 方法摘要

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<String>` | `getAllowedMethods(HttpResponse response)`
    `String` | `getMethod()` 返回该请求使用HTTP方法，如 `GET` ， `PUT` ， `POST` ，或其他。

    - ### Methods inherited from class org.apache.http.client.methods.HttpRequestBase

      `getConfig, getProtocolVersion, getRequestLine, getURI, releaseConnection, setConfig, setProtocolVersion, setURI, started, toString`

    - ### Methods inherited from class org.apache.http.client.methods.AbstractExecutionAwareRequest

      `abort, clone, completed, isAborted, reset, setCancellable, setConnectionRequest, setReleaseTrigger`

    - ### Methods inherited from class org.apache.http.message.AbstractHttpMessage

      `addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.http.client.methods.HttpUriRequest

      `abort, isAborted`

    - ### Methods inherited from interface org.apache.http.HttpMessage

      `addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams`

- - ### 字段详细信息

    - #### METHOD_NAME

          public static final String METHOD_NAME

      另请参见：
        Constant Field Values

  - ### 构造方法详细信息

    - #### HttpOptions

          public HttpOptions()

    - #### HttpOptions

          public HttpOptions(URI uri)

    - #### HttpOptions

          public HttpOptions(String uri)

      异常
        `IllegalArgumentException` - 如果uri无效。

  - ### 方法详细信息

    - #### getMethod

          public String getMethod()

      说明从界面： `HttpUriRequest`复制
      返回该请求使用HTTP方法，如 `GET` ， `PUT` ， `POST` ，或其他。
      Specified by:
        `getMethod`在界面 `HttpUriRequest`
      Specified by:
        `getMethod`在 `HttpRequestBase`

    - #### getAllowedMethods

          public Set<String> getAllowedMethods(HttpResponse response)

Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.

本帮助文档是使用 《谷歌翻译》翻译，请与英文版配合使用 by--QQ:654638585