org.apache.hc.core5.http.impl.io

## Class DefaultClassicHttpRequestFactory

- java.lang.Object
- - org.apache.hc.core5.http.impl.io.DefaultClassicHttpRequestFactory

- All Implemented Interfaces:
    HttpRequestFactory<ClassicHttpRequest>

      @Contract(threading=IMMUTABLE)
      public class DefaultClassicHttpRequestFactory
      extends Object
      implements HttpRequestFactory<ClassicHttpRequest>

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

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultClassicHttpRequestFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClassicHttpRequest` | `newHttpRequest(String method, String uri)` Creates request message with the given request method and request URI.
    `ClassicHttpRequest` | `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 DefaultClassicHttpRequestFactory INSTANCE

  - ### Constructor Detail

    - #### DefaultClassicHttpRequestFactory

          public DefaultClassicHttpRequestFactory()

  - ### Method Detail

    - #### newHttpRequest

          public ClassicHttpRequest 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<ClassicHttpRequest>`
      Parameters:
        `method` - the request method
        `uri` - the request URI
      Returns:
        request message

    - #### newHttpRequest

          public ClassicHttpRequest 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<ClassicHttpRequest>`
      Parameters:
        `method` - the request method
        `uri` - the request URI
      Returns:
        request message

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