Package 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
Modifier and TypeMethodDescriptionnewHttpResponse
(int status) Creates a new response with the given code.newHttpResponse
(int status, String reasonPhrase) Creates response message with the given code and reason phrase.
-
Method Details
-
newHttpResponse
Creates response message with the given code and reason phrase.- Parameters:
status
- the status codereasonPhrase
- the reason phrase- Returns:
- response message
- Since:
- 5.0
-
newHttpResponse
Creates a new response with the given code.- Parameters:
status
- the status code- Returns:
- response message
-