Attributes
- Companion
- class
- Source
- Body.scala
- Graph
-
- Supertypes
- Self type
-
Body.type
Members list
Value members
Concrete methods
Creates a body from a byte array without a defensive copy.
Creates a body from a byte array without a defensive copy.
The resulting body aliases the supplied mutable array. Mutating the array after calling this method mutates the body contents too. Use this only when ownership of the array has been transferred to the body.
Attributes
- Source
- Body.scala
Creates a body from a Chunk[Byte].
Creates a body from a Chunk[Byte].
The resulting body has a known chunk and known length, enabling structural equality and O(1) length queries.
Attributes
- Source
- Body.scala
Creates a body from an arbitrary byte stream.
Creates a body from an arbitrary byte stream.
The stream's knownChunk and knownLength metadata determine whether structural equality and O(1) length queries are available.
Attributes
- Source
- Body.scala
Creates a body from a string, encoding with the given charset.
Creates a body from a string, encoding with the given charset.
Sets the content type to text/plain with the specified charset.
Attributes
- Source
- Body.scala
Concrete fields
An empty body with no bytes and application/octet-stream content type.