org.apache.http.client.methods

## Class HttpGet

- 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.HttpGet

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

      public class HttpGet
      extends HttpRequestBase

  HTTP GET方法。

  HTTP GET方法在RFC2616的第9.3节中定义 ：

  > The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

  从以下版本开始：
    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
    `HttpGet()`
    `HttpGet(String uri)`
    `HttpGet(URI uri)`

  - ### 方法摘要

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

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

    - #### HttpGet

          public HttpGet()

    - #### HttpGet

          public HttpGet(URI uri)

    - #### HttpGet

          public HttpGet(String uri)

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

  - ### 方法详细信息

    - #### getMethod

          public String getMethod()

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

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

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