public static class ApiGatewayResponse.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ApiGatewayResponse.Builder |
allowCaching() |
ApiGatewayResponse |
build() |
ApiGatewayResponse.Builder |
setBase64Encoded(boolean base64Encoded)
A binary or rather a base64encoded responses requires
"Binary Media Types" to be configured in API Gateway
a request with an "Accept" header set to one of the "Binary Media
Types"
|
ApiGatewayResponse.Builder |
setBinaryBody(byte[] binaryBody)
Builds the
ApiGatewayResponse using the passed binary body
encoded as base64. |
ApiGatewayResponse.Builder |
setHeaders(Map<String,String> headers) |
ApiGatewayResponse.Builder |
setObjectBody(Object objectBody)
Builds the
ApiGatewayResponse using the passed object body
converted to JSON. |
ApiGatewayResponse.Builder |
setRawBody(String rawBody)
Builds the
ApiGatewayResponse using the passed raw body string. |
ApiGatewayResponse.Builder |
setRedirect(String url) |
ApiGatewayResponse.Builder |
setStatusCode(int statusCode) |
ApiGatewayResponse.Builder |
withNoCache() |
public ApiGatewayResponse.Builder setStatusCode(int statusCode)
public ApiGatewayResponse.Builder setHeaders(Map<String,String> headers)
public ApiGatewayResponse.Builder withNoCache()
public ApiGatewayResponse.Builder allowCaching()
public ApiGatewayResponse.Builder setRawBody(String rawBody)
ApiGatewayResponse using the passed raw body string.public ApiGatewayResponse.Builder setObjectBody(Object objectBody)
ApiGatewayResponse using the passed object body
converted to JSON.public ApiGatewayResponse.Builder setRedirect(String url)
public ApiGatewayResponse.Builder setBinaryBody(byte[] binaryBody)
ApiGatewayResponse using the passed binary body
encoded as base64. setBase64Encoded(true) will be in invoked automatically.public ApiGatewayResponse.Builder setBase64Encoded(boolean base64Encoded)
public ApiGatewayResponse build()
Copyright © 2018. All rights reserved.