Skip to content

Instantly share code, notes, and snippets.

@t3hnar
Created April 13, 2012 07:25
Show Gist options
  • Save t3hnar/2374796 to your computer and use it in GitHub Desktop.
Save t3hnar/2374796 to your computer and use it in GitHub Desktop.
Akka Http processing
val func = (req: HttpServletRequest) => {
// ASYNC SCOPE
// heavy scope, actually this is a place async is needed for
// async request might expire
(res: HttpServletResponse) => {
// RESPONSE SCOPE
// lite scope for putting collected data to response, called if not expired
(result: Boolean) => {
// CALLBACK SCOPE
// called to notify whether response sent successfully
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment