Representation of the HTTP response to send back to the client
- Value Params
- attributes
io.chrisdavenport.vault.Vault containing additional parameters which may be used by the http4s backend for additional processing such as java.io.File object
- body
EntityBody[F] representing the possible body of the response
- headers
Headers containing all response headers
- status
Status code and message
- Companion
- object
Type members
Value members
Concrete methods
Add a Set-Cookie header for the provided ResponseCookie
Add a Set-Cookie header for the provided ResponseCookie
Add a org.http4s.headers.Set-Cookie header with the provided values
Add a org.http4s.headers.Set-Cookie header with the provided values
Returns a list of cookies from the org.http4s.headers.Set-Cookie headers. Includes expired cookies, such as those that represent cookie deletion.
Returns a list of cookies from the org.http4s.headers.Set-Cookie headers. Includes expired cookies, such as those that represent cookie deletion.
Add a org.http4s.headers.Set-Cookie which will remove the specified cookie from the client
Add a org.http4s.headers.Set-Cookie which will remove the specified cookie from the client
Add a org.http4s.headers.Set-Cookie which will remove the specified cookie from the client
Add a org.http4s.headers.Set-Cookie which will remove the specified cookie from the client
Inherited methods
Add a header to these headers. The header should be a type with a
recurring Header
instance to ensure that the new value can be
appended to any existing values.
Add a header to these headers. The header should be a type with a
recurring Header
instance to ensure that the new value can be
appended to any existing values.
>>> import cats.effect.IO
>>> import org.http4s.headers.Accept
>>> val req = Request[IO]().addHeader(Accept(MediaRange.`application/*`))
>>> req.headers.get[Accept]
Some(Accept(NonEmptyList(application/*)))
>>> val req2 = req.addHeader(Accept(MediaRange.`text/*`))
>>> req2.headers.get[Accept]
Some(Accept(NonEmptyList(application/*, text/*)))
////*/
- Inherited from
- Message
Decode the Media to the specified type
Decode the Media to the specified type
- Type Params
- T
type of the result
- Value Params
- decoder
EntityDecoder used to decode the Media
- Returns
the effect which will generate the
DecodeResult[T]
- Inherited from
- Media
Keep headers that satisfy the predicate
Keep headers that satisfy the predicate
- Value Params
- f
predicate
- Returns
a new message object which has only headers that satisfy the predicate
- Inherited from
- Message
Add the provided headers to the existing headers, replacing those of the same header name
Add the provided headers to the existing headers, replacing those of the same header name
>>> import cats.effect.IO
>>> import org.http4s.headers.Accept
>>> val req = Request[IO]().putHeaders(Accept(MediaRange.`application/*`))
>>> req.headers.get[Accept]
Some(Accept(NonEmptyList(application/*)))
>>> val req2 = req.putHeaders(Accept(MediaRange.`text/*`))
>>> req2.headers.get[Accept]
Some(Accept(NonEmptyList(text/*)))
////
- Inherited from
- Message
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.
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.
- Inherited from
- Message
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.
- Type Params
- A
type of the value to store
- Value Params
- 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
- Inherited from
- Message
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.
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.
- Inherited from
- Message
Set an empty entity body on this message, and remove all payload headers that make no sense with an empty body.
Set an empty entity body on this message, and remove all payload headers that make no sense with an empty body.
- Inherited from
- Message
Replace the body of this message with a new body
Replace the body of this message with a new body
- Type Params
- T
type of the Body
- Value Params
- 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
- Inherited from
- Message
Returns a new message object without the specified key in the attributes.
Returns a new message object without the specified key in the attributes.
- Value Params
- key
io.chrisdavenport.vault.Key to remove
- Returns
a new message object without the key
- Inherited from
- Message