Body

zio.http.Body$
See theBody companion trait
object Body

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Body.type

Members list

Value members

Concrete methods

def fromCharSequence(charSequence: CharSequence, charset: Charset): Body

Constructs a zio.http.Body from the contents of a file.

Constructs a zio.http.Body from the contents of a file.

Attributes

def fromCharSequenceStream(stream: ZStream[Any, Throwable, CharSequence], charset: Charset)(implicit trace: Trace): Body

Constructs a zio.http.Body from a stream of text, using the specified character set, which defaults to the HTTP character set.

Constructs a zio.http.Body from a stream of text, using the specified character set, which defaults to the HTTP character set.

Attributes

def fromChunk(data: Chunk[Byte]): Body

Constructs a zio.http.Body from a chunk of bytes.

Constructs a zio.http.Body from a chunk of bytes.

Attributes

def fromFile(file: File, chunkSize: Int): Body

Constructs a zio.http.Body from the contents of a file.

Constructs a zio.http.Body from the contents of a file.

Attributes

def fromMultipartForm(form: Form, specificBoundary: Boundary)(implicit trace: Trace): Body

Constructs a zio.http.Body from from form data, using multipart encoding and the specified character set, which defaults to UTF-8.

Constructs a zio.http.Body from from form data, using multipart encoding and the specified character set, which defaults to UTF-8.

Attributes

def fromMultipartFormUUID(form: Form)(implicit trace: Trace): UIO[Body]

Constructs a zio.http.Body from from form data, using multipart encoding and the specified character set, which defaults to UTF-8. Utilizes a random boundary based on a UUID.

Constructs a zio.http.Body from from form data, using multipart encoding and the specified character set, which defaults to UTF-8. Utilizes a random boundary based on a UUID.

Attributes

def fromSocketApp(app: WebSocketApp[Any]): WebsocketBody
def fromStream(stream: ZStream[Any, Throwable, Byte]): Body

Constructs a zio.http.Body from a stream of bytes.

Constructs a zio.http.Body from a stream of bytes.

Attributes

def fromString(text: String, charset: Charset): Body

Helper to create Body from String

Helper to create Body from String

Attributes

def fromURLEncodedForm(form: Form, charset: Charset): Body

Constructs a zio.http.Body from form data using URL encoding and the default character set.

Constructs a zio.http.Body from form data using URL encoding and the default character set.

Attributes

Concrete fields

val empty: Body

A body that contains no data.

A body that contains no data.

Attributes