Created
October 7, 2022 11:58
-
-
Save s1monw1/fbaa5b23eff6bdf3087c628751d2d02f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//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