Created
April 17, 2018 21:01
-
-
Save pedantix/8038e5928989b7cb1eb14506b19b62df to your computer and use it in GitHub Desktop.
Vapor Teapot Route, inspired by @rafiki270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.get("teapot") { req -> Response in | |
let resp = req.makeResponse() | |
resp.http.status = .custom(code: 418, reasonPhrase: "I am teapot") | |
return resp | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment