org.apache.hc.core5.http.message

## Class HttpRequestWrapper

- java.lang.Object
- - org.apache.hc.core5.http.message.AbstractMessageWrapper
  - - org.apache.hc.core5.http.message.HttpRequestWrapper

- All Implemented Interfaces:
    HttpMessage, HttpRequest, MessageHeaders

      public class HttpRequestWrapper
      extends AbstractMessageWrapper
      implements HttpRequest

  `HttpRequest` wrapper.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpRequestWrapper(HttpRequest message)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `URIAuthority` | `getAuthority()` Returns authority of this request message.
    `String` | `getMethod()` Returns method of this request message.
    `String` | `getPath()` Returns URI path of this request message or `null` if not set.
    `String` | `getRequestUri()` Returns request URI of this request message.
    `String` | `getScheme()` Returns scheme of this request message.
    `URI` | `getUri()` Returns full request URI of this request message.
    `void` | `setAuthority(URIAuthority authority)` Sets authority of this request message.
    `void` | `setPath(String path)` Sets URI path of this request message.
    `void` | `setScheme(String scheme)` Sets scheme of this request message.
    `void` | `setUri(URI requestUri)` Sets the full request URI of this request message.

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

      `addHeader, addHeader, containsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, getVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setVersion, toString`

    - ### 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.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`

- - ### Constructor Detail

    - #### HttpRequestWrapper

          public HttpRequestWrapper(HttpRequest message)

  - ### Method Detail

    - #### getMethod

          public String getMethod()

      Description copied from interface: `HttpRequest`
      Returns method of this request message.
      Specified by:
        `getMethod` in interface `HttpRequest`
      Returns:
        the request method.

    - #### getPath

          public String getPath()

      Description copied from interface: `HttpRequest`
      Returns URI path of this request message or `null` if not set.
      Specified by:
        `getPath` in interface `HttpRequest`
      Returns:
        the request URI or `null`.

    - #### setPath

          public void setPath(String path)

      Description copied from interface: `HttpRequest`
      Sets URI path of this request message.
      Specified by:
        `setPath` in interface `HttpRequest`

    - #### getScheme

          public String getScheme()

      Description copied from interface: `HttpRequest`
      Returns scheme of this request message.
      Specified by:
        `getScheme` in interface `HttpRequest`
      Returns:
        the scheme or `null`.

    - #### setScheme

          public void setScheme(String scheme)

      Description copied from interface: `HttpRequest`
      Sets scheme of this request message.
      Specified by:
        `setScheme` in interface `HttpRequest`

    - #### getAuthority

          public URIAuthority getAuthority()

      Description copied from interface: `HttpRequest`
      Returns authority of this request message.
      Specified by:
        `getAuthority` in interface `HttpRequest`
      Returns:
        the authority or `null`.

    - #### setAuthority

          public void setAuthority(URIAuthority authority)

      Description copied from interface: `HttpRequest`
      Sets authority of this request message.
      Specified by:
        `setAuthority` in interface `HttpRequest`

    - #### getRequestUri

          public String getRequestUri()

      Description copied from interface: `HttpRequest`
      Returns request URI of this request message. It may be an absolute or relative URI. Applicable to HTTP/1.1 version or earlier.
      Specified by:
        `getRequestUri` in interface `HttpRequest`
      Returns:
        the request URI.

    - #### getUri

          public URI getUri()
                     throws URISyntaxException

      Description copied from interface: `HttpRequest`
      Returns full request URI of this request message.
      Specified by:
        `getUri` in interface `HttpRequest`
      Returns:
        the request URI.
      Throws:
        `URISyntaxException`

    - #### setUri

          public void setUri(URI requestUri)

      Description copied from interface: `HttpRequest`
      Sets the full request URI of this request message.
      Specified by:
        `setUri` in interface `HttpRequest`
      Parameters:
        `requestUri` - the request URI.

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