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 overridden by all responses that support cloning.
|
creationTime, status, statusDetails, statusDetails, toString
public 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()
AbstractCouchbaseResponse
Stub method implementation which needs to be overridden by all responses that support cloning.
request
in interface CouchbaseResponse
request
in class AbstractCouchbaseResponse
public HttpResponseStatus httpStatus()
public HttpHeaders headers()
public String body()
Copyright © 2017 Couchbase, Inc.. All rights reserved.