org.apache.hc.core5.http

## Interface HttpResponseFactory<T extends HttpResponse>

- All Known Implementing Classes:
    DefaultClassicHttpResponseFactory, DefaultHttpResponseFactory

      public interface HttpResponseFactory<T extends HttpResponse>

  A factory for `HttpResponse` objects.
  Since:
    4.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `newHttpResponse(int status)` Creates a new response with the given code.
    `T` | `newHttpResponse(int status, String reasonPhrase)` Creates response message with the given code and reason phrase.

- - ### Method Detail

    - #### newHttpResponse

          T newHttpResponse(int status,
                            String reasonPhrase)

      Creates response message with the given code and reason phrase.
      Parameters:
        `status` - the status code
        `reasonPhrase` - the reason phrase
      Returns:
        response message
      Since:
        5.0

    - #### newHttpResponse

          T newHttpResponse(int status)

      Creates a new response with the given code.
      Parameters:
        `status` - the status code
      Returns:
        response message

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