Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created October 7, 2022 11:58
Show Gist options
  • Save s1monw1/fbaa5b23eff6bdf3087c628751d2d02f to your computer and use it in GitHub Desktop.
Save s1monw1/fbaa5b23eff6bdf3087c628751d2d02f to your computer and use it in GitHub Desktop.
//call handler directly
val request = Request(GET, "/any")
val handlerResponse: Response = pingPongHandler(request)
//call handler through routing
val secondRequest = Request(GET, "/ping")
.header("accept-encoding", "gzip")
val routingCallResponse: Response = app(secondRequest)
// or: start the HTTP server with the app
app.asServer(Jetty(9000)).start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment