package http
- Alphabetic
- By Inheritance
- http
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final class CaseInsensitive extends Ordered[CaseInsensitive] with Serializable
- sealed abstract class HttpBinding extends Product with Serializable
- sealed trait HttpContractError extends Throwable with NoStackTrace
- sealed trait HttpDiscriminator extends Product with Serializable
- trait HttpEndpoint[I] extends AnyRef
- type HttpMediaType = http.HttpMediaType.Type
- sealed trait HttpMethod extends Product with Serializable
- type HttpPayloadDecoder[A] = Decoder[[β$0$]Either[HttpContractError, β$0$], Blob, A]
- case class HttpPayloadError(path: PayloadPath, expected: String, message: String) extends Throwable with HttpContractError with Product with Serializable
- final case class HttpRequest[+A](method: HttpMethod, uri: HttpUri, headers: Map[CaseInsensitive, Seq[String]], body: A) extends Product with Serializable
- final case class HttpResponse[+A](statusCode: Int, headers: Map[CaseInsensitive, Seq[String]], body: A) extends Product with Serializable
-
sealed
trait
HttpRestSchema[A] extends AnyRef
This construct indicates how a schema is split between http metadata (ie headers, path parameters, query parameters, status code) and body.
This construct indicates how a schema is split between http metadata (ie headers, path parameters, query parameters, status code) and body.
When the input or the output of an http operation has some elements that are coming from the body and some elements that are coming from the metadata, the schema is split in two schemas that each track the relevant subset.
The partial data resulting from the successful decoding of both subsets can be reconciled to recover the total data.
On the encoding side, the split allows to only encode the relevant subset of data as http headers, and the other subset as http body.
-
trait
HttpStatusCode[A] extends AnyRef
Typeclass construct allowing to retrieve the status code associated to a value.
- final case class HttpUri(scheme: HttpUriScheme, host: String, port: Option[Int], path: IndexedSeq[String], queryParams: Map[String, Seq[String]], pathParams: Option[Map[String, String]]) extends Product with Serializable
- sealed trait HttpUriScheme extends AnyRef
-
case class
Metadata(path: Map[String, String] = Map.empty, query: Map[String, Seq[String]] = Map.empty, headers: Map[CaseInsensitive, Seq[String]] = Map.empty, statusCode: Option[Int] = None) extends Product with Serializable
Datatype containing metadata associated to a http message.
Datatype containing metadata associated to a http message.
The metadata is what is found in the http headers, and can be derived from the http path, the query parameters, or the headers.
Associated to it are a pair of Encoder/Decoder typeclasses, that can be derived from a schema.
- path
the path parameters of the http message
- query
the query parameters of the http message
- headers
the header parameters of the http message
- sealed trait MetadataError extends Throwable with HttpContractError
- type PathParams = Map[String, String]
- sealed trait PathSegment extends AnyRef
- case class UnknownErrorResponse(code: Int, headers: Map[CaseInsensitive, Seq[String]], body: String) extends Throwable with Product with Serializable
-
final
case class
UrlForm(values: List[FormData]) extends Product with Serializable
Represents data that was encoded using the
application/x-www-form-urlencoded
format. - final case class UrlFormDecodeError(path: PayloadPath, message: String) extends Throwable with Product with Serializable
Value Members
- val amazonErrorTypeHeader: String
- val errorTypeHeader: String
-
final
def
httpMatch[Alg[_[_, _, _, _, _]]](service: Service[Alg], method: HttpMethod, pathSegments: IndexedSeq[String]): Option[(Service.Endpoint[_, _, _, _, _], HttpEndpoint[_], Map[String, String])]
Returns the first http endpoint that matches both a method and path, as well as the map of extracted segment values.
- final def httpMatch[Alg[_[_, _, _, _, _]]](service: Service[Alg], method: HttpMethod, path: String): Option[(Service.Endpoint[_, _, _, _, _], HttpEndpoint[_], Map[String, String])]
- object CaseInsensitive extends Serializable
- object HttpBinding extends Companion[HttpBinding] with Serializable
- object HttpContractError extends Serializable
- object HttpDiscriminator extends Serializable
- object HttpEndpoint
-
object
HttpErrorSelector
Utility function to help find the decoder matching a certain discriminator This is useful when deserializing on the client side of a request/response round trip.
- object HttpHostPrefix
- object HttpMediaType extends Newtype[String]
- object HttpMethod extends Serializable
- object HttpPayloadError extends Serializable
- object HttpRequest extends Serializable
- object HttpResponse extends Serializable
- object HttpRestSchema
- object HttpStatusCode extends Impl[HttpStatusCode]
- object HttpUnaryClientCodecs
- object HttpUnaryServerCodecs
- object HttpUnaryServerRouter
- object HttpUriScheme
- object Metadata extends Serializable
- object MetadataError extends Serializable
- object PathSegment
- object UrlForm extends Serializable
- object matchPath extends ScalaCompat