org.apache.hc.client5.http.classic.methods

## Class HttpUriRequestBase

- java.lang.Object
- - org.apache.hc.core5.http.message.HeaderGroup
  - - org.apache.hc.core5.http.message.BasicHttpRequest
    - - org.apache.hc.core5.http.message.BasicClassicHttpRequest
      - - org.apache.hc.client5.http.classic.methods.HttpUriRequestBase

- All Implemented Interfaces:
    Serializable, HttpUriRequest, Configurable, org.apache.hc.core5.concurrent.Cancellable, org.apache.hc.core5.concurrent.CancellableDependency, org.apache.hc.core5.http.ClassicHttpRequest, org.apache.hc.core5.http.HttpEntityContainer, org.apache.hc.core5.http.HttpMessage, org.apache.hc.core5.http.HttpRequest, org.apache.hc.core5.http.MessageHeaders
  Direct Known Subclasses:
    HttpDelete, HttpGet, HttpHead, HttpOptions, HttpPatch, HttpPost, HttpPut, HttpTrace

      public class HttpUriRequestBase
      extends org.apache.hc.core5.http.message.BasicClassicHttpRequest
      implements HttpUriRequest, org.apache.hc.core5.concurrent.CancellableDependency

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpUriRequestBase(String method, URI requestUri)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abort()` Aborts execution of the request.
    `boolean` | `cancel()`
    `RequestConfig` | `getConfig()` Returns actual request configuration.
    `boolean` | `isAborted()` Tests if the request execution has been aborted.
    `boolean` | `isCancelled()`
    `void` | `reset()` Resets internal state of the request making it reusable.
    `void` | `setConfig(RequestConfig requestConfig)`
    `void` | `setDependency(org.apache.hc.core5.concurrent.Cancellable cancellable)`
    `String` | `toString()`

    - ### Methods inherited from class org.apache.hc.core5.http.message.BasicClassicHttpRequest

      `getEntity, setEntity`

    - ### Methods inherited from class org.apache.hc.core5.http.message.BasicHttpRequest

      `addHeader, getAuthority, getMethod, getPath, getRequestUri, getScheme, getUri, getVersion, setAbsoluteRequestUri, setAuthority, setHeader, setPath, setScheme, setUri, setVersion`

    - ### Methods inherited from class org.apache.hc.core5.http.message.HeaderGroup

      `addHeader, clear, containsHeader, countHeaders, getCondensedHeader, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator, removeHeader, removeHeaders, removeHeaders, setHeader, setHeaders`

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

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

    - ### Methods inherited from interface org.apache.hc.core5.http.HttpRequest

      `getAuthority, getMethod, getPath, getRequestUri, getScheme, getUri, setAuthority, setPath, setScheme, setUri`

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

      `addHeader, addHeader, getVersion, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setVersion`

    - ### Methods inherited from interface org.apache.hc.core5.http.MessageHeaders

      `containsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator`

    - ### Methods inherited from interface org.apache.hc.core5.http.HttpEntityContainer

      `getEntity, setEntity`

- - ### Constructor Detail

    - #### HttpUriRequestBase

          public HttpUriRequestBase(String method,
                            URI requestUri)

  - ### Method Detail

    - #### cancel

          public boolean cancel()

      Specified by:
        `cancel` in interface `org.apache.hc.core5.concurrent.Cancellable`

    - #### isCancelled

          public boolean isCancelled()

      Specified by:
        `isCancelled` in interface `org.apache.hc.core5.concurrent.CancellableDependency`

    - #### setDependency

          public void setDependency(org.apache.hc.core5.concurrent.Cancellable cancellable)

      Specified by:
        `setDependency` in interface `org.apache.hc.core5.concurrent.CancellableDependency`
      Since:
        4.2

    - #### reset

          public void reset()

      Resets internal state of the request making it reusable.
      Since:
        4.2

    - #### abort

          public void abort()
                     throws UnsupportedOperationException

      Description copied from interface: `HttpUriRequest`
      Aborts execution of the request.
      Specified by:
        `abort` in interface `HttpUriRequest`
      Throws:
        `UnsupportedOperationException` - if the abort operation is not supported / cannot be implemented.

    - #### isAborted

          public boolean isAborted()

      Description copied from interface: `HttpUriRequest`
      Tests if the request execution has been aborted.
      Specified by:
        `isAborted` in interface `HttpUriRequest`
      Returns:
        `true` if the request execution has been aborted, `false` otherwise.

    - #### setConfig

          public void setConfig(RequestConfig requestConfig)

    - #### getConfig

          public RequestConfig getConfig()

      Description copied from interface: `Configurable`
      Returns actual request configuration.
      Specified by:
        `getConfig` in interface `Configurable`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `org.apache.hc.core5.http.message.BasicHttpRequest`

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