| Modifier and Type | Method and Description |
|---|---|
Response |
build()
Builds and returns an immutable
Response instance. |
static ResponseBuilder |
newResponse()
Creates a new builder instance.
|
ResponseBuilder |
withBody(String body)
Set the JSON body received.
|
ResponseBuilder |
withHeaders(Map<String,String> headers)
Set the response headers received.
|
ResponseBuilder |
withStatus(int status)
Set the HTTP response status.
|
public static ResponseBuilder newResponse()
public Response build()
Response instance.public ResponseBuilder withStatus(int status)
status - HTTP status.public ResponseBuilder withHeaders(Map<String,String> headers)
headers - Response headers received.public ResponseBuilder withBody(String body)
body - JSON received in the response body.Copyright © 2014. All Rights Reserved.