org.mashupbots.socko.routes
Matches the path of org.mashupbots.socko.events.EndPoints in org.mashupbots.socko.events.SockoEvents using regular expressions.
For example, to match /path/to/file, first define your regular expression as an object:
/path/to/file
object MyPathRegex extends PathRegex("""/path/([a-z0-9]+)/([a-z0-9]+)""".r)
Then, when defining your Route:
val r = Routes({ case MyPathRegex(m) => { assert(m.group(1) == "to") assert(m.group(2) == "file") ... } })
Matches the path of org.mashupbots.socko.events.EndPoints in org.mashupbots.socko.events.SockoEvents using regular expressions.
For example, to match
/path/to/file
, first define your regular expression as an object:Then, when defining your Route: