org.mashupbots.socko.routes
Matches HTTP requests that have hosts matching the specified regular expression.
For example, to match www.sockoweb.com, first define your regex as an object:
www.sockoweb.com
object MyHostRegex extends HostRegex("""www\.([a-z]+)\.com""".r)
Then, when defining your Route:
val r = Routes({ case MyHostRegex(m) => { assert(m.group(1) == "sockoweb") ... } })
Matches HTTP requests that have hosts matching the specified regular expression.
For example, to match
www.sockoweb.com, first define your regex as an object:object MyHostRegex extends HostRegex("""www\.([a-z]+)\.com""".r)Then, when defining your Route:
val r = Routes({ case MyHostRegex(m) => { assert(m.group(1) == "sockoweb") ... } })