Skip to content

Instantly share code, notes, and snippets.

@pedantix
Created April 17, 2018 21:01
Show Gist options
  • Save pedantix/8038e5928989b7cb1eb14506b19b62df to your computer and use it in GitHub Desktop.
Save pedantix/8038e5928989b7cb1eb14506b19b62df to your computer and use it in GitHub Desktop.
Vapor Teapot Route, inspired by @rafiki270
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