org.apache.hc.core5.http

## Interface HttpRequestFactory<T extends HttpRequest>

- All Known Implementing Classes:
    DefaultClassicHttpRequestFactory, DefaultHttpRequestFactory

      public interface HttpRequestFactory<T extends HttpRequest>

  A factory for `HttpRequest` objects.
  Since:
    4.0

- - ### Method Summary

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

- - ### Method Detail

    - #### newHttpRequest

          T newHttpRequest(String method,
                         String uri)
                                               throws MethodNotSupportedException

      Creates request message with the given request method and request URI.
      Parameters:
        `method` - the request method
        `uri` - the request URI
      Returns:
        request message
      Throws:
        `MethodNotSupportedException` - if the given `method` is not supported.
      Since:
        5.0

    - #### newHttpRequest

          T newHttpRequest(String method,
                         URI uri)
                                               throws MethodNotSupportedException

      Creates request message with the given request method and request URI.
      Parameters:
        `method` - the request method
        `uri` - the request URI
      Returns:
        request message
      Throws:
        `MethodNotSupportedException` - if the given `method` is not supported.

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