package http
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- http
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
final
case class
API[Input, Output](method: HttpMethod, requestInput: RequestInput[Input], outputSchema: Schema[Output]) extends Product with Serializable
- Input and Output as Schemas.
- Dynamically decide response format based upon Request Header
- final class APIOps[Input, Output, Id] extends AnyRef
- final class APIOpsUnit[Input, Id] extends AnyRef
- case class Body[A](schema: Schema[A], contentType: ContentType) extends RequestInput[A] with Product with Serializable
- sealed trait ContentType extends AnyRef
-
sealed
trait
Header[A] extends RequestInput[A]
HEADERS
- sealed trait HttpFailure extends AnyRef
- sealed trait HttpMethod extends Product with Serializable
-
sealed
trait
Path[A] extends RequestInput[A]
A DSL for describe Paths
A DSL for describe Paths
- ex: /users
- ex: /users/:id/friends
- ex: /users/:id/friends/:friendId
- ex: /posts/:id/comments/:commentId
- final case class PathState(input: List[String]) extends Product with Serializable
-
sealed
trait
Query[A] extends RequestInput[A]
QUERY PARAMS
-
sealed
trait
RequestInput[A] extends Product with Serializable
A RequestInput is a description of a Path, Query Parameters, Headers and Body
A RequestInput is a description of a Path, Query Parameters, Headers and Body
- Path: /users/:id/posts
- Query Parameters: ?page=1&limit=10
- Headers: X-User-Id: 1 or Accept: application/json
- Body: anything that has a schema
- trait Zipper[A, B] extends AnyRef
- trait ZipperLowPriority1 extends ZipperLowPriority2
- trait ZipperLowPriority2 extends ZipperLowPriority3
- trait ZipperLowPriority3 extends AnyRef
Value Members
- implicit def apiToOps[Input, Output](api: API[Input, Output])(implicit arg0: NotUnit[Output]): APIOps[Input, Output, Id]
- implicit def apiToOpsUnit[Input](api: API[Input, Unit]): APIOpsUnit[Input, Id]
- def bigDecimal(name: String): Query[BigDecimal]
- val bigDecimal: Path[BigDecimal]
- def bigInteger(name: String): Query[BigInteger]
- val bigInteger: Path[BigInteger]
- def boolean(name: String): Query[Boolean]
- val boolean: Path[Boolean]
- def char(name: String): Query[Char]
- val char: Path[Char]
- def double(name: String): Query[Double]
- val double: Path[Double]
- def float(name: String): Query[Float]
- val float: Path[Float]
- def int(name: String): Query[Int]
- val int: Path[Int]
- def long(name: String): Query[Long]
- val long: Path[Long]
- def path[A](implicit schema: Schema[A]): Match[A]
- def query[A](name: String)(implicit schema: Schema[A]): Query[A]
- def short(name: String): Query[Short]
- val short: Path[Short]
- def string(name: String): Query[String]
- val string: Path[String]
- implicit def stringToPath(string: String): Path[Unit]
- implicit lazy val unitCodec: JsonCodec[Unit]
- def uuid(name: String): Query[UUID]
- val uuid: Path[UUID]
- object API extends Serializable
- object Body extends Serializable
- object ContentType
- object FormUrlEncodedEncoder
- object Header extends Serializable
- object HttpFailure
- object HttpMethod extends Serializable
- object Path extends Serializable
- object Query extends Serializable
- object RequestInput extends Serializable
- object Zipper extends ZipperLowPriority1