final case class Binary(name: String, data: Chunk[Byte], contentType: MediaType, transferEncoding: Option[ContentTransferEncoding] = None, filename: Option[String] = None) extends FormField with Product with Serializable
A binary form data part.
- name
Name of this form data part. This is the value of the
namefield in theContent-Dispositionwithin this part.- data
The data of this form data part. This is the data between the headers and the boundary.
- contentType
The content type of this form data part. This is the value of the
Content-Typewith in this part.- transferEncoding
The transfer encoding of this form data part. This is the value of the
Content-Transfer-Encodingwithin this part. IMPORTANT NOTE: The data is not encoded in any way relative to the providedtransferEncoding. It is the responsibility of the user to encode thedataaccordingly.
- Alphabetic
- By Inheritance
- Binary
- Serializable
- Serializable
- Product
- Equals
- FormField
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Binary(name: String, data: Chunk[Byte], contentType: MediaType, transferEncoding: Option[ContentTransferEncoding] = None, filename: Option[String] = None)
- name
Name of this form data part. This is the value of the
namefield in theContent-Dispositionwithin this part.- data
The data of this form data part. This is the data between the headers and the boundary.
- contentType
The content type of this form data part. This is the value of the
Content-Typewith in this part.- transferEncoding
The transfer encoding of this form data part. This is the value of the
Content-Transfer-Encodingwithin this part. IMPORTANT NOTE: The data is not encoded in any way relative to the providedtransferEncoding. It is the responsibility of the user to encode thedataaccordingly.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asChunk(implicit trace: Trace): ZIO[Any, Nothing, Chunk[Byte]]
Gets the value of this form field as a chunk of bytes.
Gets the value of this form field as a chunk of bytes. If it is a text field, the value gets encoded as an UTF-8 byte stream.
- Definition Classes
- FormField
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
asText(implicit trace: Trace): ZIO[Any, CharacterCodingException, String]
Gets the value of this form field as a String.
Gets the value of this form field as a String. If it is a binary field, the value is interpreted as an UTF-8 byte stream.
- Definition Classes
- FormField
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
- val contentType: MediaType
- val data: Chunk[Byte]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val filename: Option[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
name(newName: String): FormField
- Definition Classes
- FormField
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
stringValue: Option[String]
Gets the value as a String, but only if it is a text or simple field.
Gets the value as a String, but only if it is a text or simple field. For binary fields it returns None.
- Definition Classes
- FormField
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val transferEncoding: Option[ContentTransferEncoding]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )