Routing Requests

Learn how to handle the routing requests in a Ktor application.

We'll cover the following...

Handling URLs with the routing block

Now, let’s take a look at the routing block:

routing {
    get("/") {
       call.respondText("OK")
    }
}

This block describes all the URLs that will be handled by our server. In this case, we only handle the root URL. When that ...