object Routes extends RoutesCompanionVersionSpecific with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Routes
  2. Serializable
  3. RoutesCompanionVersionSpecific
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[Env, Err](route: Route[Env, Err], routes: Route[Env, Err]*): Routes[Env, Err]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. val empty: Routes[Any, Nothing]

    An HTTP application that does not handle any routes.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def fromIterable[Env, Err](routes: Iterable[Route[Env, Err]]): Routes[Env, Err]
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. def serveDirectory(path: Path, docRoot: File)(implicit trace: Trace): Routes[Any, Nothing]

    Creates routes for serving static files from the directory docRoot at the url path path.

    Creates routes for serving static files from the directory docRoot at the url path path.

    Example: Routes.serveDirectory(Path.empty / "assets", new File("/some/local/path"))

    With this routes in place, a request to https://www.domain.com/assets/folder/file1.jpg would serve the local file /some/local/path/folder/file1.jpg.

  18. def serveResources(path: Path, resourcePrefix: String = "public")(implicit trace: Trace): Routes[Any, Nothing]

    Creates routes for serving static files at URL path path from resources with the given resourcePrefix.

    Creates routes for serving static files at URL path path from resources with the given resourcePrefix.

    Example: Routes.serveResources(Path.empty / "assets", "webapp")

    With this routes in place, a request to https://www.domain.com/assets/folder/file1.jpg would serve the file src/main/resources/webapp/folder/file1.jpg. Note how the URL path is removed and the resourcePrefix prepended.

    Most build systems support resources in the src/main/resources directory. In the above example, the file src/main/resources/webapp/folder/file1.jpg would be served.

    The resourcePrefix defaults to "public". To prevent insecure sharing of resource files, resourcePrefix must start with a / followed by at least 1 valid java identifier character. The / will be prepended if it is not present.

  19. def singleton[Env, Err](h: Handler[Env, Err, (Path, Request), Response])(implicit trace: Trace): Routes[Env, Err]
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped