case class FetchBody(content: ReadableStream[Uint8Array], mediaType: Option[MediaType], boundary: Option[Boundary]) extends Body with Product with Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FetchBody
  2. Serializable
  3. Product
  4. Equals
  5. Body
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new FetchBody(content: ReadableStream[Uint8Array], mediaType: Option[MediaType], boundary: Option[Boundary])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ++(that: Body): Body

    A right-biased way of combining two bodies.

    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.

    Definition Classes
    Body
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def asArray(implicit trace: Trace): Task[Array[Byte]]

    Returns an effect that decodes the content of the body as array of bytes.

    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.

    Definition Classes
    FetchBodyBody
  6. def asChunk(implicit trace: Trace): Task[Chunk[Byte]]

    Returns an effect that decodes the content of the body as a chunk of bytes.

    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.

    Definition Classes
    FetchBodyBody
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def asMultipartForm(implicit trace: Trace): Task[Form]

    Returns an effect that decodes the content of the body as a multipart form.

    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.

    Definition Classes
    Body
  9. def asMultipartFormStream(implicit trace: Trace): Task[StreamingForm]

    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.

    Definition Classes
    Body
  10. def asStream(implicit trace: Trace): ZStream[Any, Throwable, Byte]

    Returns a stream that contains the bytes of 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.

    Definition Classes
    FetchBodyBody
  11. final def asString(charset: Charset)(implicit trace: Trace): Task[String]

    Decodes the content of the body as a string with the provided charset.

    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.

    Definition Classes
    Body
  12. final def asString(implicit trace: Trace): Task[String]

    Decodes the content of the body as a string with the default charset.

    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.

    Definition Classes
    Body
  13. def asURLEncodedForm(implicit trace: Trace): Task[Form]

    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.

    Definition Classes
    Body
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  15. val content: ReadableStream[Uint8Array]
  16. def contentType(newMediaType: MediaType, newBoundary: Boundary): Body
    Definition Classes
    FetchBodyBody
  17. def contentType(newMediaType: MediaType): 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

    Definition Classes
    FetchBodyBody
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  20. def isComplete: Boolean

    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.

    Definition Classes
    FetchBodyBody
  21. def isEmpty: Boolean

    Returns whether or not the body is known to be empty.

    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.

    Definition Classes
    FetchBodyBody
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def knownContentLength: Option[Long]

    Returns whether or not the content length is known

    Returns whether or not the content length is known

    Definition Classes
    FetchBodyBody
  24. val mediaType: Option[MediaType]

    Returns the media type for this Body

    Returns the media type for this Body

    Definition Classes
    FetchBodyBody
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  28. def productElementNames: Iterator[String]
    Definition Classes
    Product
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def to[A](implicit codec: BinaryCodec[A], trace: Trace): Task[A]

    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 = Body.from(person)
    val decodedPerson = body.to[Person]
    Definition Classes
    Body
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Body

Inherited from AnyRef

Inherited from Any

Ungrouped