public class HttpResponseBuilder extends Object
Default response is
200 OK HTTP/1.1
Constructor and Description |
---|
HttpResponseBuilder() |
Modifier and Type | Method and Description |
---|---|
org.apache.http.client.methods.CloseableHttpResponse |
build()
Build the HTTP response using all data previously set on this builder and/or use defaults.
|
HttpResponseBuilder |
entity(org.apache.http.HttpEntity paramEntity) |
HttpResponseBuilder |
entity(String entityBody) |
HttpResponseBuilder |
header(String name,
String value) |
HttpResponseBuilder |
protocolVersion(org.apache.http.ProtocolVersion paramProtocolVersion) |
HttpResponseBuilder |
reason(String paramReason) |
HttpResponseBuilder |
status(int paramStatus)
Set HTTP Status.
|
public org.apache.http.client.methods.CloseableHttpResponse build()
public HttpResponseBuilder entity(org.apache.http.HttpEntity paramEntity)
public HttpResponseBuilder entity(String entityBody) throws UnsupportedEncodingException
UnsupportedEncodingException
public HttpResponseBuilder header(String name, String value)
public HttpResponseBuilder protocolVersion(org.apache.http.ProtocolVersion paramProtocolVersion)
public HttpResponseBuilder reason(String paramReason)
public HttpResponseBuilder status(int paramStatus)
paramStatus
- the response status.Copyright © 2008–2018. All rights reserved.