-
Notifications
You must be signed in to change notification settings - Fork 571
Closed
Description
- Framework version: 1.0
- Implementations: Jersey / Spring / Spring Boot / Spark
Add a new streamProxy(InputStream, OutputStream, Context) method to the LambdaContainerHandler object.
Scenario
Simplifies the task of writing Lambda RequestStreamHandler` classes from:
@Override
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
throws IOException {
AwsProxyRequest request = LambdaContainerHandler.getObjectMapper().readValue(inputStream, AwsProxyRequest.class);
AwsProxyResponse resp = handler.proxy(request, context);
LambdaContainerHandler.getObjectMapper().writeValue(outputStream, resp);
outputStream.close();
}to:
@Override
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
throws IOException {
handler.streamProxy(inputStream, outputStream, context);
}