in sample-apps/java-events/src/main/java/example/HandlerApiGateway.java [18:32]
public APIGatewayProxyResponseEvent handleRequest(APIGatewayProxyRequestEvent event, Context context)
{
APIGatewayProxyResponseEvent response = new APIGatewayProxyResponseEvent();
response.setIsBase64Encoded(false);
response.setStatusCode(200);
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("Content-Type", "text/html");
response.setHeaders(headers);
response.setBody("<!DOCTYPE html><html><head><title>AWS Lambda sample</title></head><body>"+
"<h1>Welcome</h1><p>Page generated by a Lambda function.</p>" +
"</body></html>");
// log execution details
Util.logEnvironment(event, context, gson);
return response;
}