Skip to content

Instantly share code, notes, and snippets.

@robhinds
Created December 18, 2017 16:32
Show Gist options
  • Save robhinds/7bcc5cefaa56d36861ea86d1092ebac3 to your computer and use it in GitHub Desktop.
Save robhinds/7bcc5cefaa56d36861ea86d1092ebac3 to your computer and use it in GitHub Desktop.
trait MethodAndPathDirectives {
def getPath[L](x: PathMatcher[L]): Directive[L] = get & path(x)
def postPath[L](x: PathMatcher[L]): Directive[L] = post & path(x)
def putPath[L](x: PathMatcher[L]): Directive[L] = put & path(x)
def deletePath[L](x: PathMatcher[L]): Directive[L] = delete & path(x)
def headPath[L](x: PathMatcher[L]): Directive[L] = head & path(x)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment