Trait

io.finch

Endpoints

Related Doc: package finch

Permalink

trait Endpoints extends AnyRef

A collection of Endpoint combinators.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Endpoints
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class BasicAuth(user: String, password: String) extends Product with Serializable

    Permalink

    Maintains Basic HTTP Auth for an arbitrary Endpoint.

  2. type Endpoint0 = Endpoint[HNil]

    Permalink
  3. type Endpoint2[A, B] = Endpoint[::[A, ::[B, HNil]]]

    Permalink
  4. type Endpoint3[A, B, C] = Endpoint[::[A, ::[B, ::[C, HNil]]]]

    Permalink
  5. case class Extractor[A](name: String, f: (String) ⇒ Option[A]) extends Endpoint[A] with Product with Serializable

    Permalink

    An universal extractor that extracts some value of type A if it's possible to fetch the value from the string.

  6. case class TailExtractor[A](name: String, f: (String) ⇒ Option[A]) extends Endpoint[Seq[A]] with Product with Serializable

    Permalink

    An extractor that extracts a value of type Seq[A] from the tail of the route.

  7. type RequestReader[A] = Endpoint[A]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.10.0) RequestReaders are now Endpoints

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. object * extends Endpoint[HNil]

    Permalink

    An Endpoint that skips all path segments.

  4. object / extends Endpoint[HNil]

    Permalink

    An identity Endpoint.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. object BasicAuthFailed extends Exception

    Permalink

    An Exception representing a failed authorization with BasicAuth.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. val asyncBody: Endpoint[AsyncStream[Buf]]

    Permalink

    An evaluating Endpoint that reads a required chunked streaming binary body, interpreted as an AsyncStream[Buf].

    An evaluating Endpoint that reads a required chunked streaming binary body, interpreted as an AsyncStream[Buf]. The returned Endpoint only matches chunked (streamed) requests.

  9. val binaryBody: Endpoint[Array[Byte]]

    Permalink

    An evaluating Endpoint that reads a required binary request body, interpreted as an Array[Byte], or throws a Error.NotPresent exception.

    An evaluating Endpoint that reads a required binary request body, interpreted as an Array[Byte], or throws a Error.NotPresent exception. The returned Endpoint only matches non-chunked (non-streamed) requests.

  10. val binaryBodyOption: Endpoint[Option[Array[Byte]]]

    Permalink

    An evaluating Endpoint that reads a binary request body, interpreted as a Array[Byte], into an Option.

    An evaluating Endpoint that reads a binary request body, interpreted as a Array[Byte], into an Option. The returned Endpoint only matches non-chunked (non-streamed) requests.

  11. val body: Endpoint[String]

    Permalink

    An evaluatingEndpoint that reads the required request body, interpreted as a String, or throws an Error.NotPresent exception.

    An evaluatingEndpoint that reads the required request body, interpreted as a String, or throws an Error.NotPresent exception. The returned Endpoint only matches non-chunked (non-streamed) requests.

  12. val bodyOption: Endpoint[Option[String]]

    Permalink

    An evaluating Endpoint that reads an optional request body, interpreted as a String, into an Option.

    An evaluating Endpoint that reads an optional request body, interpreted as a String, into an Option. The returned Endpoint only matches non-chunked (non-streamed) requests.

  13. object boolean extends Extractor[Boolean]

    Permalink

    A matching Endpoint that reads a boolean value from the current path segment.

  14. implicit def booleanToMatcher(b: Boolean): Endpoint0

    Permalink
  15. object booleans extends TailExtractor[Boolean]

    Permalink

    A matching Endpoint that reads a boolean tail from the current path segment.

  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def connect[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is CONNECT and the underlying endpoint succeeds on it.

  18. def cookie(name: String): Endpoint[Cookie]

    Permalink

    An evaluating Endpoint that reads a required cookie from the request or raises an Error.NotPresent exception when the cookie is missing.

  19. def cookieOption(name: String): Endpoint[Option[Cookie]]

    Permalink

    An evaluating Endpoint that reads an optional HTTP cookie from the request into an Option.

  20. def delete[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is DELETE and the underlying endpoint succeeds on it.

  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  23. def fileUpload(name: String): Endpoint[FileUpload]

    Permalink

    An evaluating Endpoint that reads a required file upload from a multipart/form-data request.

  24. def fileUploadOption(name: String): Endpoint[Option[FileUpload]]

    Permalink

    An evaluatingEndpoint that reads an optional file upload from a multipart/form-data request into an Option.

  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def get[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is GET and the underlying endpoint succeeds on it.

  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def head[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is HEAD and the underlying endpoint succeeds on it.

  30. def header(name: String): Endpoint[String]

    Permalink

    An evaluating Endpoint that reads a required HTTP header name from the request or raises an Error.NotPresent exception when the header is missing.

  31. def headerExists(name: String): Endpoint[String]

    Permalink

    A matching Endpoint that only matches the requests that contain a given header name.

  32. def headerOption(name: String): Endpoint[Option[String]]

    Permalink

    An evaluating Endpoint that reads an optional HTTP header name from the request into an Option.

  33. object int extends Extractor[Int]

    Permalink

    A matching Endpoint that reads an integer value from the current path segment.

  34. implicit def intToMatcher(i: Int): Endpoint0

    Permalink
  35. object ints extends TailExtractor[Int]

    Permalink

    A matching Endpoint that reads an integer tail from the current path segment.

  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. object long extends Extractor[Long]

    Permalink

    A matching Endpoint that reads a long value from the current path segment.

  38. object longs extends TailExtractor[Long]

    Permalink

    A matching Endpoint that reads a long tail from the current path segment.

  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. def options[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is OPTIONS and the underlying endpoint succeeds on it.

  43. def param(name: String): Endpoint[String]

    Permalink

    An evaluating Endpoint that reads a required query-string param name from the request or raises an Error.NotPresent exception when the param is missing; an Error.NotValid exception is the param is empty.

  44. def paramExists(name: String): Endpoint[String]

    Permalink

    A matching Endpoint that only matches the requests that contain a given query-string param name.

  45. def paramOption(name: String): Endpoint[Option[String]]

    Permalink

    An evaluating Endpoint that reads an optional query-string param name from the request into an Option.

  46. def params(name: String): Endpoint[Seq[String]]

    Permalink

    An evaluating Endpoint that reads an optional (in a meaning that a resulting Seq may be empty) multi-value query-string param name from the request into a Seq.

  47. def paramsNonEmpty(name: String): Endpoint[Seq[String]]

    Permalink

    An evaluating Endpoint that reads a required (in a meaning that a resulting Seq will have at least one element) multi-value query-string param name from the request into a Seq or raises a Error.NotPresent exception when the params are missing or empty.

  48. def patch[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is PATCH and the underlying endpoint succeeds on it.

  49. def post[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is POST and the underlying endpoint succeeds on it.

  50. def put[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is PUT and the underlying endpoint succeeds on it.

  51. object string extends StringExtractor

    Permalink

    A matching Endpoint that reads a string value from the current path segment.

  52. implicit def stringToMatcher(s: String): Endpoint0

    Permalink
  53. object strings extends TailExtractor[String]

    Permalink

    A matching Endpoint that reads a string tail from the current path segment.

  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  55. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  56. def trace[A]: (Endpoint[A]) ⇒ Endpoint[A]

    Permalink

    A combinator that wraps the given Endpoint with additional check of the HTTP method.

    A combinator that wraps the given Endpoint with additional check of the HTTP method. The resulting Endpoint succeeds on the request only if its method is TRACE and the underlying router endpoint on it.

  57. object uuid extends Extractor[UUID]

    Permalink

    A matching Endpoint that reads an UUID value from the current path segment.

  58. object uuids extends TailExtractor[UUID]

    Permalink

    A matching Endpoint that reads an UUID tail from the current path segment.

  59. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped