Skip to content

Latest commit

 

History

History
 
 

router

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Max Router

Example

val router = Router {
    path("/:user") {
        route("") { request ->
            respondWithUserRepos()
        }
        route("/:repo") { request ->
            val repo = request.params.getValue("repo")
            respondWithUserRepo(repo)
        }       
    }
}

router.handle(Uri.parse("https://github.com/pardom/max"))