Skip to content

Instantly share code, notes, and snippets.

@cardoso
Last active July 27, 2020 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cardoso/2134399fa17d96d4b44bcbebf70ac7de to your computer and use it in GitHub Desktop.
Save cardoso/2134399fa17d96d4b44bcbebf70ac7de to your computer and use it in GitHub Desktop.
...
return context.eventLoop.makeSucceededFuture(APIGateway.Response(
statusCode: .ok,
headers: ["Content-Type": "text/html; charset=UTF-8"],
body: """
<p align="center">
<h2 align="center"> Hello, world! From Swift 5.2 💘 </h2>
</p>
<hl/>
<p align="center">\(event.requestContext.identity.userAgent ?? "")</p>
""")
)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment