org.apache.hc.core5.http.impl.nio

## Class DefaultHttpRequestFactory

- java.lang.Object
- - org.apache.hc.core5.http.impl.nio.DefaultHttpRequestFactory

- All Implemented Interfaces:
    HttpRequestFactory<HttpRequest>

      @Contract(threading=IMMUTABLE)
      public class DefaultHttpRequestFactory
      extends Object
      implements HttpRequestFactory<HttpRequest>

  Default factory for creating `HttpRequest` objects.
  Since:
    4.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DefaultHttpRequestFactory` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultHttpRequestFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpRequest` | `newHttpRequest(String method, String uri)` Creates request message with the given request method and request URI.
    `HttpRequest` | `newHttpRequest(String method, URI uri)` Creates request message with the given request method and request URI.

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

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

- - ### Field Detail

    - #### INSTANCE

          public static final DefaultHttpRequestFactory INSTANCE

  - ### Constructor Detail

    - #### DefaultHttpRequestFactory

          public DefaultHttpRequestFactory()

  - ### Method Detail

    - #### newHttpRequest

          public HttpRequest newHttpRequest(String method,
                                            URI uri)

      Description copied from interface: `HttpRequestFactory`
      Creates request message with the given request method and request URI.
      Specified by:
        `newHttpRequest` in interface `HttpRequestFactory<HttpRequest>`
      Parameters:
        `method` - the request method
        `uri` - the request URI
      Returns:
        request message

    - #### newHttpRequest

          public HttpRequest newHttpRequest(String method,
                                            String uri)

      Description copied from interface: `HttpRequestFactory`
      Creates request message with the given request method and request URI.
      Specified by:
        `newHttpRequest` in interface `HttpRequestFactory<HttpRequest>`
      Parameters:
        `method` - the request method
        `uri` - the request URI
      Returns:
        request message

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