Skip to content

Instantly share code, notes, and snippets.

@hhariri
Created July 29, 2013 06:14
Show Gist options
  • Save hhariri/6102437 to your computer and use it in GitHub Desktop.
Save hhariri/6102437 to your computer and use it in GitHub Desktop.
val server = AppServer()
server.conneg() {
onAcceptHeader()
onExtension()
onQueryParameter("format")
}
server.intercept(BasicAuthenticationInterceptor("secure area", { (user: String, pass: String) -> user == pass}), "*")
server.get("/customer/:id",
{
log.write("Logging it all out")
next()
},
{
response.setCacheControl(CacheControl.NoCache)
response.send(customer)
}
)
server.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment