org.http4s.multipart.PartValue
See thePartValue companion object
Generic representation of typical Multipart Part bodies, as either a string or a file path. Produced by MultipartReceiver.auto.
Similar to Part, but with less Header-oriented detail, and a clearer distinction between in-memory data vs on-disk data.
Attributes
-
Companion
-
object
-
Source
-
PartValue.scala
-
Graph
-
-
Supertypes
-
trait Matchable
class Any
-
Known subtypes
-
Members list
Returns a byte-stream representation of the part's body.
Returns a byte-stream representation of the part's body.
For OfString parts, the underlying string is piped through a UTF-8 encoder. For OfFile parts, the underlying file's content will be read from disk.
Attributes
-
Returns
-
The part's body as a stream of bytes
-
Source
-
PartValue.scala
Fold over the different PartValue subtypes to compute a value
Fold over the different PartValue subtypes to compute a value
Value parameters
-
onFile
-
Called with the underlying filename and file path if this part is an OfFile
-
onString
-
Called with the underlying String if this part is an OfString
Attributes
-
Returns
-
The value returned by either onString or onFile
-
Source
-
PartValue.scala
Builds a new Part from this PartValue.
Builds a new Part from this PartValue.
Value parameters
-
headers
-
Any extra headers to add to the part. Content-Disposition is added automatically based on the name, and in the case of OfFile parts, the filename
-
name
-
The name of the part
Attributes
-
Returns
-
a new Part based on the given name, applicable filename, and body of this PartValue.
-
Source
-
PartValue.scala