public class RestApiResponse extends AbstractCouchbaseResponse
Response to a RestApiRequest. The response contains the HTTP status (code and message), the headers as well as the body, as a String.
| Constructor and Description |
|---|
RestApiResponse(RestApiRequest request,
HttpResponseStatus status,
HttpHeaders headers,
String body)
Create a new
RestApiResponse. |
| Modifier and Type | Method and Description |
|---|---|
String |
body() |
HttpHeaders |
headers() |
HttpResponseStatus |
httpStatus() |
RestApiRequest |
request()
Stub method implementation which needs to be overriden by all responses that support cloning.
|
creationTime, status, toStringpublic RestApiResponse(RestApiRequest request, HttpResponseStatus status, HttpHeaders headers, String body)
Create a new RestApiResponse.
request - the original request.status - the response status (code and message).body - the response body, as a string.headers - the response headers.public RestApiRequest request()
AbstractCouchbaseResponseStub method implementation which needs to be overriden by all responses that support cloning.
request in interface CouchbaseResponserequest in class AbstractCouchbaseResponsepublic HttpResponseStatus httpStatus()
public HttpHeaders headers()
public String body()
Copyright © 2017 Couchbase, Inc.. All rights reserved.