Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Returns an effect that decodes the content of the body as array of bytes. Note that attempting to decode a large stream of bytes into an array could result in an out of memory error.
Returns an effect that decodes the content of the body as array of bytes. Note that attempting to decode a large stream of bytes into an array could result in an out of memory error.
Attributes
- Definition Classes
Returns an effect that decodes the content of the body as a chunk of bytes. Note that attempting to decode a large stream of bytes into a chunk could result in an out of memory error.
Returns an effect that decodes the content of the body as a chunk of bytes. Note that attempting to decode a large stream of bytes into a chunk could result in an out of memory error.
Attributes
- Definition Classes
Returns a stream that contains the bytes of the body. This method is safe to use with large bodies, because the elements of the returned stream are lazily produced from the body.
Returns a stream that contains the bytes of the body. This method is safe to use with large bodies, because the elements of the returned stream are lazily produced from the body.
Attributes
- Definition Classes
Updates the media type attached to this body, returning a new Body with the updated media type
Updates the media type attached to this body, returning a new Body with the updated media type
Attributes
- Definition Classes
Returns whether or not the bytes of the body have been fully read.
Returns whether or not the bytes of the body have been fully read.
Attributes
- Definition Classes
Returns whether or not the body is known to be empty. Note that some bodies may not be known to be empty until an attempt is made to consume them.
Returns whether or not the body is known to be empty. Note that some bodies may not be known to be empty until an attempt is made to consume them.
Attributes
- Definition Classes
Returns whether or not the content length is known
Inherited methods
A right-biased way of combining two bodies. If either body is empty, the other will be returned. Otherwise, the right body will be returned.
A right-biased way of combining two bodies. If either body is empty, the other will be returned. Otherwise, the right body will be returned.
Attributes
- Inherited from:
- Body
Returns an effect that decodes the content of the body as a multipart form. Note that attempting to decode a large stream of bytes into a form could result in an out of memory error.
Returns an effect that decodes the content of the body as a multipart form. Note that attempting to decode a large stream of bytes into a form could result in an out of memory error.
Attributes
- Inherited from:
- Body
Returns an effect that decodes the streaming body as a multipart form.
Returns an effect that decodes the streaming body as a multipart form.
The result is a stream of FormField objects, where each FormField may be a StreamingBinary or a Text object. The StreamingBinary object contains a stream of bytes, which has to be consumed asynchronously by the user to get the next FormField from the stream.
Attributes
- Inherited from:
- Body
Returns an effect that decodes the streaming body as a multipart/mixed.
Returns an effect that decodes the streaming body as a multipart/mixed.
The result is a stream of Part objects, where each Part has headers and contents (binary stream), Part objects can be easily converted to a Body objects which provide vast API for extracting their contents.
Attributes
- Inherited from:
- Body
Attributes
- Inherited from:
- Body
Decodes the content of the body as a string with the provided charset. Note that attempting to decode a large stream of bytes into a string could result in an out of memory error.
Decodes the content of the body as a string with the provided charset. Note that attempting to decode a large stream of bytes into a string could result in an out of memory error.
Attributes
- Inherited from:
- Body
Decodes the content of the body as a string with the default charset. Note that attempting to decode a large stream of bytes into a string could result in an out of memory error.
Decodes the content of the body as a string with the default charset. Note that attempting to decode a large stream of bytes into a string could result in an out of memory error.
Attributes
- Inherited from:
- Body
Returns an effect that decodes the content of the body as form data.
Returns an effect that decodes the content of the body as form data.
Attributes
- Inherited from:
- Body
Attributes
- Inherited from:
- Body
Updates the media type attached to this body, returning a new Body with the updated media type
Updates the media type attached to this body, returning a new Body with the updated media type
Attributes
- Inherited from:
- Body
Materializes the body of the request into memory
Returns the media type for this Body
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Decodes the content of the body as a value based on a zio-schema zio.schema.codec.BinaryCodec.
Decodes the content of the body as a value based on a zio-schema zio.schema.codec.BinaryCodec.
Example for json:
import zio.schema.json.codec._
case class Person(name: String, age: Int)
implicit val schema: Schema[Person] = DeriveSchema.gen[Person]
val person = Person("John", 42)
val body = ???
val decodedPerson = body.to[Person]
Attributes
- Inherited from:
- Body