Packages

p

spinoco.fs2.http

routing

package routing

Source
routing.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. routing
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Base64Url extends AnyRef

    tags bytes encoded as Base64Url *

  2. trait BodyHelper[F[_]] extends AnyRef
  3. trait MatchResult[+F[_], +A] extends AnyRef
  4. sealed trait Matcher[+F[_], +A] extends AnyRef
  5. type Route[F[_]] = Matcher[F, Stream[F, HttpResponse[F]]]
  6. sealed trait StringDecoder[A] extends AnyRef

    Decoder for A to be decoded from supplied String

  7. implicit final class StringMatcherSyntax extends AnyVal

Value Members

  1. val Delete: Matcher[Nothing, protocol.http.HttpMethod.Value]
  2. val Get: Matcher[Nothing, protocol.http.HttpMethod.Value]
  3. val Options: Matcher[Nothing, protocol.http.HttpMethod.Value]
  4. val Post: Matcher[Nothing, protocol.http.HttpMethod.Value]
  5. val Put: Matcher[Nothing, protocol.http.HttpMethod.Value]
  6. def as[A](implicit decoder: StringDecoder[A]): Matcher[Nothing, A]

    decodes head of the path to A givne supplied decoder from string *

  7. def body[F[_]]: BodyHelper[F]

    extracts body of the request *

  8. def choice[F[_], A](matcher: Matcher[F, A], matchers: Matcher[F, A]*): Matcher[F, A]

    matches any supplied matcher *

  9. val empty: Matcher[Nothing, Unit]

    matches if remaining path segments are empty *

  10. def eval[F[_], A](f: F[A]): Matcher[F, A]

    Evaluates f returning its result as successful matcher

  11. def header[H <: HttpHeader](implicit T: Typeable[H]): Matcher[Nothing, H]

    matches header of type h *

  12. def method[F[_]](method: protocol.http.HttpMethod.Value): Matcher[F, protocol.http.HttpMethod.Value]

    matches supplied method *

  13. def param[A](key: String)(implicit decoder: StringDecoder[A]): Matcher[Nothing, A]

    Matches if query contains key and that can be decoded to A via supplied decoder

  14. def paramBase64(key: String, alphabet: Base64Alphabet = Bases.Alphabets.Base64Url): Matcher[Nothing, ByteVector]

    Decodes Base64 (Url) encoded binary data in parameter specified by key *

  15. def path: Matcher[Nothing, Path]

    matches to relative path in current context *

  16. def route[F[_]](r: Route[F])(implicit F: Sync[F]): (HttpRequestHeader, Stream[F, Byte]) ⇒ Stream[F, HttpResponse[F]]

    converts supplied route to function that is handled over to server to perform the routing *

  17. implicit def string2RequestMatcher(s: String): Matcher[Nothing, String]
  18. def websocket[F[_], I, O](pingInterval: Duration = 30.seconds, handshakeTimeout: FiniteDuration = 10.seconds, maxFrameSize: Int = 1024*1024)(implicit arg0: Async[F], arg1: Decoder[I], arg2: Encoder[O]): Match[Nothing, (Pipe[F, Frame[I], Frame[O]]) ⇒ Resource[F, HttpResponse[F]]]

    Creates a Matcher that when supplied a pipe will create the websocket connection.

    Creates a Matcher that when supplied a pipe will create the websocket connection. I is received from the client and O is sent to client. Decoder (for I) and Encoder (for O) must be supplied.

    pingInterval

    An interval for the Ping / Pong protocol.

    handshakeTimeout

    An timeout to await for handshake to be successfull. If the handshake is not completed within supplied period, connection is terminated.

    maxFrameSize

    Maximum size of single websocket frame. If the binary size of single frame is larger than supplied value, websocket will fail.

  19. object MatchResult
  20. object Matcher
  21. object StringDecoder

Inherited from AnyRef

Inherited from Any

Ungrouped