smithy4s.http

Type members

Classlikes

final class BodyPartial[A]
Companion:
object
Companion:
class
Companion:
object
Companion:
class
trait CodecAPI

An abstraction exposing serialisation functions to decode from bytes / encode to bytes, based on a path-dependant Codec types.

An abstraction exposing serialisation functions to decode from bytes / encode to bytes, based on a path-dependant Codec types.

Only used in unary request/response patterns.

Companion:
object
object CodecAPI
Companion:
class
final class ErrorAltPicker[E](alts: Vector[Alt[Schema, E, _]])

Utility class to help find the best alternative out of a error union type. This is useful when deserializing on the client side of a request/ response round trip.

Utility class to help find the best alternative out of a error union type. This is useful when deserializing on the client side of a request/ response round trip.

Value parameters:
alts

alternatives of the error union to choose from

sealed abstract class HttpBinding(val tpe: Type) extends Product with Serializable
Companion:
object
Companion:
class
sealed trait HttpContractError extends Throwable with NoStackTrace
Companion:
object
Companion:
class
trait HttpEndpoint[I]
Companion:
object
Companion:
class
object HttpMediaType extends Newtype[String]
sealed trait HttpMethod
Companion:
object
object HttpMethod
Companion:
class

Typeclass construct allowing to retrieve the status code associated to a value.

Typeclass construct allowing to retrieve the status code associated to a value.

Companion:
object
Companion:
class
case class Metadata(path: Map[String, String], query: Map[String, Seq[String]], headers: Map[CaseInsensitive, Seq[String]])

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.

Value parameters:
headers

the header parameters of the http message

path

the path parameters of the http message

query

the query parameters of the http message

Companion:
object
object Metadata
Companion:
class
sealed trait MetadataError extends HttpContractError
Companion:
object
Companion:
class
final class MetadataPartial[A]
Companion:
object
Companion:
class
sealed trait PathSegment
Companion:
object
Companion:
class
case class PayloadError(path: PayloadPath, expected: String, message: String) extends HttpContractError
Companion:
object
Companion:
class
case class UnknownErrorResponse(code: Int, headers: Map[String, String], body: String) extends Throwable
object matchPath

Value members

Concrete methods

final def httpMatch[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _]](serviceProvider: Provider[Alg, Op], method: HttpMethod, path: String): Option[(Endpoint[Op, _, _, _, _, _], HttpEndpoint[_], Map[String, String])]
final def httpMatch[Alg[_[_, _, _, _, _]], Op[_, _, _, _, _]](serviceProvider: Provider[Alg, Op], method: HttpMethod, pathSegments: Vector[String]): Option[(Endpoint[Op, _, _, _, _, _], 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.

Returns the first http endpoint that matches both a method and path, as well as the map of extracted segment values.