Packages

sealed trait Message[F[_]] extends Media[F]

Represents a HTTP Message. The interesting subclasses are Request and Response.

Self Type
Message[F]
Source
Message.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Message
  2. Media
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Self = SelfF[F]
  2. abstract type SelfF[F2[_]] <: Message[F2[_]] { type SelfF[F3[_]] = Message.this.SelfF[F3] }

Abstract Value Members

  1. abstract def attributes: Vault
  2. abstract def body: EntityBody[F]
    Definition Classes
    MessageMedia
  3. abstract def headers: Headers
    Definition Classes
    MessageMedia
  4. abstract def httpVersion: HttpVersion

Concrete Value Members

  1. final def as[A](implicit F: MonadThrow[F], decoder: EntityDecoder[F, A]): F[A]

    Decode the Media to the specified type

    Decode the Media to the specified type

    If no valid Status has been described, allow Ok

    A

    type of the result

    decoder

    EntityDecoder used to decode the Media

    returns

    the effect which will generate the A

    Definition Classes
    Media
  2. final def attemptAs[T](implicit decoder: EntityDecoder[F, T]): DecodeResult[F, T]

    Decode the Media to the specified type

    Decode the Media to the specified type

    T

    type of the result

    decoder

    EntityDecoder used to decode the Media

    returns

    the effect which will generate the DecodeResult[T]

    Definition Classes
    Media
  3. final def bodyText(implicit RT: RaiseThrowable[F], defaultCharset: Charset = DefaultCharset): Stream[F, String]
    Definition Classes
    Media
  4. final def charset: Option[Charset]
    Definition Classes
    Media
  5. final def contentLength: Option[Long]
    Definition Classes
    Media
  6. final def contentType: Option[Content-Type]
    Definition Classes
    Media
  7. def covary[F2[x] >: F[x]]: SelfF[F2]

    Lifts this Message's body to the specified effect type.

    Lifts this Message's body to the specified effect type.

    Definition Classes
    MessageMedia
  8. def filterHeaders(f: (Raw) ⇒ Boolean): Self

    Keep headers that satisfy the predicate

    Keep headers that satisfy the predicate

    f

    predicate

    returns

    a new message object which has only headers that satisfy the predicate

  9. def isChunked: Boolean
  10. def putHeaders(headers: ToRaw*): Self

    Add the provided headers to the existing headers, replacing those of the same header name

  11. def removeHeader[A](implicit h: Header[A, _]): Self
  12. def removeHeader(key: CIString): Self
  13. def trailerHeaders(implicit F: Applicative[F]): F[Headers]

    The trailer headers, as specified in Section 3.6.1 of RFC 2616.

    The trailer headers, as specified in Section 3.6.1 of RFC 2616. The resulting F might not complete until the entire body has been consumed.

  14. def transformHeaders(f: (Headers) ⇒ Headers): Self
  15. def withAttribute[A](key: Key[A], value: A): Self

    Generates a new message object with the specified key/value pair appended to the #attributes.

    Generates a new message object with the specified key/value pair appended to the #attributes.

    A

    type of the value to store

    key

    io.chrisdavenport.vault.Key with which to associate the value

    value

    value associated with the key

    returns

    a new message object with the key/value pair appended

  16. def withAttributes(attributes: Vault): Self
  17. def withBodyStream(body: EntityBody[F]): Self

    Sets the entity body without affecting headers such as Transfer-Encoding or Content-Length.

    Sets the entity body without affecting headers such as Transfer-Encoding or Content-Length. Most use cases are better served by withEntity, which uses an EntityEncoder to maintain the headers.

  18. def withContentType(contentType: Content-Type): Self
  19. def withContentTypeOption(contentTypeO: Option[Content-Type]): Self
  20. def withEmptyBody: Self

    Set an empty entity body on this message, and remove all payload headers that make no sense with an empty body.

  21. def withEntity[T](b: T)(implicit w: EntityEncoder[F, T]): Self

    Replace the body of this message with a new body

    Replace the body of this message with a new body

    T

    type of the Body

    b

    body to attach to this method

    w

    EntityEncoder with which to convert the body to an EntityBody

    returns

    a new message with the new body

  22. def withHeaders(headers: ToRaw*): Self
  23. def withHeaders(headers: Headers): Self
  24. def withHttpVersion(httpVersion: HttpVersion): Self
  25. def withTrailerHeaders(trailerHeaders: F[Headers]): Self
  26. def withoutAttribute(key: Key[_]): Self

    Returns a new message object without the specified key in the #attributes.

    Returns a new message object without the specified key in the #attributes.

    key

    io.chrisdavenport.vault.Key to remove

    returns

    a new message object without the key

  27. def withoutContentType: Self
  28. def withoutTrailerHeaders: Self

Deprecated Value Members

  1. def withBody[T](b: T)(implicit F: Applicative[F], w: EntityEncoder[F, T]): F[Self]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.19) Use withEntity

  2. def withType(t: MediaType)(implicit F: Functor[F]): Self
    Annotations
    @deprecated
    Deprecated

    (Since version 0.20.0-M2) Use withContentType(Content-Type(t)) instead