org.apache.hc.client5.http.methods

## Interface HttpUriRequest

All Superinterfaces:
  org.apache.hc.core5.http.HttpMessage<org.apache.hc.core5.http.HttpEntity>, org.apache.hc.core5.http.HttpRequest, org.apache.hc.core5.http.MessageHead

All Known Implementing Classes:
  HttpDelete, HttpGet, HttpHead, HttpOptions, HttpPatch, HttpPost, HttpPut, HttpRequestBase, HttpRequestWrapper, HttpTrace

    public interface HttpUriRequest
    extends org.apache.hc.core5.http.HttpRequest

Extended version of the `HttpRequest` interface that provides convenience methods to access request properties such as request URI and method type.

Since:
  4.0

### Method Summary

Methods
`void` `abort()` Aborts execution of the request.
`String` `getMethod()` Returns the HTTP method this request uses, such as `GET`, `PUT`, `POST`, or other.
`URI` `getURI()` Returns the URI this request uses, such as `http://example.org/path/to/file`.
`boolean` `isAborted()` Tests if the request execution has been aborted.

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

`getRequestLine`

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

`addHeader, addHeader, getEntity, getProtocolVersion, removeHeader, removeHeaders, setEntity, setHeader, setHeader, setHeaders`

### Methods inherited from interface org.apache.hc.core5.http.MessageHead

`containsHeader, containsHeaders, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, headerIterator, headerIterator`

### Method Detail

#### getMethod

    String getMethod()

Returns the HTTP method this request uses, such as `GET`, `PUT`, `POST`, or other.

#### getURI

    URI getURI()

Returns the URI this request uses, such as `http://example.org/path/to/file`.

Note that the URI may be absolute URI (as above) or may be a relative URI.

Implementations are encouraged to return the URI that was initially requested.

To find the final URI after any redirects have been processed, please see the section entitled HTTP execution context in the HttpClient Tutorial

#### abort

    void abort()
               throws UnsupportedOperationException

Aborts execution of the request.

Throws:
  `UnsupportedOperationException` - if the abort operation is not supported / cannot be implemented.

#### isAborted

    boolean isAborted()

Tests if the request execution has been aborted.

Returns:
  `true` if the request execution has been aborted, `false` otherwise.