Home

hexagon_core / com.hexagonkt.http / Path

Path

data class Path

A path definition. It parses path patterns and extract values for parameters.

Differences with Sinatra:

  • No splats (you can use named parameters though)
  • Delimiter is {var} to conform with RFC 6570

Constructors

Name Summary
<init> A path definition. It parses path patterns and extract values for parameters.Path(path:String)

Properties

Name Summary
hasParameters val hasParameters:Boolean
hasWildcards val hasWildcards:Boolean
parameterIndex val parameterIndex:List<String>
path val path:String
regex val regex:Regex?
segments val segments:List<String>

Functions

Name Summary
create fun create(vararg parameters:Pair<String,Any>):String
extractParameters fun extractParameters(requestUrl:String):Map<String,String>
matches fun matches(requestUrl:String):Boolean