staticFiles

cask.endpoints.staticFiles
class staticFiles(val path: String, headers: Seq[(String, String)]) extends HttpEndpoint[String, Seq[String]]

Attributes

Graph
Supertypes
trait HttpEndpoint[String, Seq[String]]
trait Endpoint[Raw, String, Seq[String], Request]
trait Decorator[Raw, String, Seq[String], Request]
class Annotation
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

Inherited types

final type Delegate = (Request, Map[String, Seq[String]]) => Result[String]

Attributes

Inherited from:
Decorator
final type InputTypeAlias = Seq[String]

Attributes

Inherited from:
Decorator

Value members

Concrete methods

override def subpath: Boolean

Whether or not this endpoint allows matching on sub-paths: does @endpoint("/foo") capture the path "/foo/bar/baz"? Useful to e.g. have an endpoint match URLs with paths in a filesystem (real or virtual) to serve files

Whether or not this endpoint allows matching on sub-paths: does @endpoint("/foo") capture the path "/foo/bar/baz"? Useful to e.g. have an endpoint match URLs with paths in a filesystem (real or virtual) to serve files

Attributes

Definition Classes
def wrapFunction(ctx: Request, delegate: Delegate): Result[Raw]
def wrapPathSegment(s: String): Seq[String]

HttpEndpoints are unique among decorators in that they alone can bind path segments to parameters, e.g. binding /hello/:world to (world: Int). In order to do so, we need to box up the path segment strings into an Input so they can later be parsed by getParamParser into an instance of the appropriate type.

HttpEndpoints are unique among decorators in that they alone can bind path segments to parameters, e.g. binding /hello/:world to (world: Int). In order to do so, we need to box up the path segment strings into an Input so they can later be parsed by getParamParser into an instance of the appropriate type.

Attributes

Inherited methods

def convertToResultType[T](t: T)(implicit f: Conversion[T, String]): String

Attributes

Inherited from:
Endpoint
def getParamParser[T](implicit p: QueryParamReader[T]): InputParser[T]

Attributes

Inherited from:
Decorator

Concrete fields

val methods: Seq[String]

Which HTTP methods does this endpoint support? POST? GET? PUT? Or some combination of those?

Which HTTP methods does this endpoint support? POST? GET? PUT? Or some combination of those?

Attributes

val path: String

What is the path that this particular endpoint matches?

What is the path that this particular endpoint matches?

Attributes