Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
APIGatewayProxyResponseEvent response = new APIGatewayProxyResponseEvent()
try {
final String pageContents = this.getPageContents("");
String output = String
.format("{ \"message\": \"hello world\", \"location\": \"%s\" }", pageContents);
return response.withStatusCode(200).withBody(output);
} catch (IOException e) {
return response.withBody("{}").withStatusCode(500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.