Class

fm.http.server.RouteMatchers

RichPathMatchers

Related Doc: package RouteMatchers

Permalink

implicit final class RichPathMatchers extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RichPathMatchers
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RichPathMatchers(sc: StringContext)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  7. def p: RichPathMatchingRegex

    Permalink
  8. def regex: RichPathMatchingRegex

    Permalink

    This supports full regex Patterns with named capturing groups that can be used with Scala String Interpolation

    This supports full regex Patterns with named capturing groups that can be used with Scala String Interpolation

    e.g.:

    /path/(?<$rest>.+) ==> Will match /path/to/somewhere with the "to/somewhere" being bound the the "rest" variable

  9. val sc: StringContext

    Permalink
  10. def simple: RichPathMatchingRegex

    Permalink

    This support simple patterns of the form: /path/$part ==> Will match /path/foo, /path/bar, etc...

    This support simple patterns of the form: /path/$part ==> Will match /path/foo, /path/bar, etc... /path/$part* ==> Will match /path/to/somewhere, /path/foo/bar, /path/foo, etc...

    By default a variable will match everything up to the next / character. If the * is used then the / character is also included.

    Other simple regex operators are also now supported:

    /path/$part/? ==> Allow an optional trailing slash /path/$part.(gif|jpg) ==> Allows either gif or jpg extension

    These are operators are supported: ( ) | ?

    The group operator will be re-written as a non-capturing group.

    However those operators must be self-contained within each part of the string. This means you can't have something like:

    /path(/$part)? ==> DOES NOT WORK - The grouping operator spans multiple parts of the string

    TODO: make this work with query params. e.g.: /path/$var?foo=$foo

  11. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped