Skip to content
This repository has been archived by the owner on May 27, 2018. It is now read-only.

fcomb/route-trie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URI Route Trie

Build Status License

High performance URI router based on radix trie structure.

Add to project

Add resolvers to your build.sbt

resolvers += Resolver.bintrayRepo("fcomb", "maven")

Add dependencies to your build.sbt

libraryDependencies += "io.fcomb" %% "route-trie" % "0.4.0"

Usage

import io.fcomb.trie.RouteTrie
import io.fcomb.trie.RouteMethods._

val tree = RouteTrie[Int](
  "/users" -> (GET, 1),
  "/users/:id" -> (GET, 2),
  "/files/*file" -> (POST, 3)
)
tree.get(GET, "/users/12") // will return Some((2, Some(OpenHashMap("id" -> "12"))))

Releases

No releases published

Packages

No packages published

Languages