smithy4s.http

package smithy4s.http

Members list

Packages

Type members

Classlikes

Attributes

Companion
object
Supertypes
trait Serializable
trait Comparable[CaseInsensitive]
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class HttpBinding(val tpe: Type) extends Product, Serializable

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
trait Has[HttpBinding]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
sealed trait HttpContractError extends Throwable, NoStackTrace

Attributes

Companion
object
Supertypes
trait NoStackTrace
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait HttpDiscriminator extends Product, Serializable

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class FullId
class NameOnly
class StatusCode
object Undetermined

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait HttpEndpoint[I]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object HttpEndpoint

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

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.

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.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object HttpMediaType extends Newtype[String]

Attributes

Supertypes
class Newtype[String]
trait HasId
class Object
trait Matchable
class Any
Self type
sealed trait HttpMethod extends Product, Serializable

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object DELETE
object GET
class OTHER
object PATCH
object POST
object PUT
Show all
object HttpMethod

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
HttpMethod.type
case class HttpPayloadError(path: PayloadPath, expected: String, message: String) extends HttpContractError

Attributes

Companion
object
Supertypes
trait Product
trait Equals
trait NoStackTrace
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class HttpRequest[+A](method: HttpMethod, uri: HttpUri, headers: Map[CaseInsensitive, Seq[String]], body: A)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object HttpRequest

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class HttpResponse[+A](statusCode: Int, headers: Map[CaseInsensitive, Seq[String]], body: A)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object HttpResponse

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait HttpRestSchema[A]

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.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Empty[A]
class MetadataAndBody[A]
class OnlyBody[A]
class OnlyMetadata[A]

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait HttpStatusCode[A]

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

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class HttpUri(scheme: HttpUriScheme, host: String, port: Option[Int], path: IndexedSeq[String], queryParams: Map[String, Seq[String]], pathParams: Option[Map[String, String]])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait HttpUriScheme

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Http
object Https
object HttpUriScheme

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Metadata(path: Map[String, String], query: Map[String, Seq[String]], headers: Map[CaseInsensitive, Seq[String]], statusCode: Option[Int])

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

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
object Metadata

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Metadata.type
sealed trait MetadataError extends HttpContractError

Attributes

Companion
object
Supertypes
trait NoStackTrace
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object MetadataError

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait PathSegment

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PathSegment

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class UnknownErrorResponse(code: Int, headers: Map[CaseInsensitive, Seq[String]], body: String) extends Throwable

Attributes

Supertypes
trait Product
trait Equals
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
final case class UrlForm(values: List[FormData])

Represents data that was encoded using the application/x-www-form-urlencoded format.

Represents data that was encoded using the application/x-www-form-urlencoded format.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object UrlForm

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
UrlForm.type
final case class UrlFormDecodeError(path: PayloadPath, message: String) extends Throwable

Attributes

Supertypes
trait Product
trait Equals
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object matchPath

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
matchPath.type

Types

type HttpPayloadDecoder[A] = Decoder[[_] =>> Either[HttpContractError, _$1], Blob, A]

Value members

Concrete methods

final def httpMatch[Alg[_[_, _, _, _, _]]](service: Service[Alg], method: HttpMethod, path: String): Option[(Endpoint[service.Operation, _, _, _, _, _], HttpEndpoint[_], Map[String, String])]
final def httpMatch[Alg[_[_, _, _, _, _]]](service: Service[Alg], method: HttpMethod, pathSegments: IndexedSeq[String]): Option[(Endpoint[service.Operation, _, _, _, _, _], 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.

Attributes

Concrete fields

val amazonErrorTypeHeader: String
val errorTypeHeader: String