Top Description Methods
org.apache.hc.core5.http

public Interface HttpResponseFactory<T extends org.apache.hc.core5.http.HttpResponse>

Known Direct Implementers
org.apache.hc.core5.http.impl.io.DefaultClassicHttpResponseFactory, org.apache.hc.core5.http.impl.nio.DefaultHttpResponseFactory

A factory for HttpResponse objects.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

response message
newHttpResponse
(int
the status code
status
,
String
the reason phrase
reasonPhrase
)

Creates response message with the given code and reason phrase.

public T

Returns:

response message
newHttpResponse
(int
the status code
status
)

Creates a new response with the given code.

Method Detail

newHttpResponseback to summary
public T newHttpResponse(int status, String reasonPhrase)

Creates response message with the given code and reason phrase.

Parameters
status:int

the status code

reasonPhrase:String

the reason phrase

Returns:T

response message

Since
5.0
newHttpResponseback to summary
public T newHttpResponse(int status)

Creates a new response with the given code.

Parameters
status:int

the status code

Returns:T

response message