Writeable

play.api.http.Writeable
See theWriteable companion class
object Writeable extends DefaultWriteables

Helper utilities for Writeable.

Attributes

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

Members list

Value members

Concrete methods

def apply[A](transform: A => ByteString, contentType: Option[String]): Writeable[A]
def apply[A](transform: A => ByteString)(implicit ct: ContentTypeOf[A]): Writeable[A]

Creates a Writeable[A] using a content type for A available in the implicit scope

Creates a Writeable[A] using a content type for A available in the implicit scope

Value parameters

transform

Serializing function

Attributes

Inherited methods

def writeableOf_JsValue(codec: Codec, contentType: Option[String]): Writeable[JsValue]

Writeable for JsValue values using an arbitrary codec. Can be used to force a non-UTF-8 encoding for JSON.

Writeable for JsValue values using an arbitrary codec. Can be used to force a non-UTF-8 encoding for JSON.

Attributes

Inherited from:
DefaultWriteables
def writeableOf_MultipartFormData[A](boundary: Option[String])(implicit codec: Codec): Writeable[MultipartFormData[A]]

Writeable for MultipartFormData.

Writeable for MultipartFormData.

If you pass a boundary, it will be used to separate the data/file parts of the multipart/form-data body. If you don't pass a boundary a random one will be generated.

Attributes

Inherited from:
DefaultWriteables

Deprecated and Inherited methods

Writeable for MultipartFormData.

Writeable for MultipartFormData.

If you pass a contentType which contains a boundary, this boundary will be used to separate the data/file parts of the multipart/form-data body. If you don't pass a contentType, or it does not contain a boundary, a random one will be generated.

Attributes

Deprecated
true
Inherited from:
DefaultWriteables

Writeable for MultipartFormData.

Writeable for MultipartFormData.

If the passed writeable contains a contentType with a boundary, this boundary will be used to separate the data/file parts of the multipart/form-data body. If you don't pass a contentType with the writeable, or it does not contain a boundary, a random one will be generated.

Attributes

Deprecated
true
Inherited from:
DefaultWriteables

Implicits

Inherited implicits

implicit val wByteArray: Writeable[Array[Byte]]

Straightforward Writeable for Array[Byte] values.

Straightforward Writeable for Array[Byte] values.

Attributes

Inherited from:
DefaultWriteables
implicit val wBytes: Writeable[ByteString]

Straightforward Writeable for ByteString values.

Straightforward Writeable for ByteString values.

Attributes

Inherited from:
DefaultWriteables
implicit def wString(implicit codec: Codec): Writeable[String]

Straightforward Writeable for String values.

Straightforward Writeable for String values.

Attributes

Inherited from:
DefaultWriteables
implicit def writeableOf_Content[C <: Content](implicit codec: Codec, ct: ContentTypeOf[C]): Writeable[C]

Writeable for play.twirl.api.Content values.

Writeable for play.twirl.api.Content values.

Attributes

Inherited from:
LowPriorityWriteables

Writeable for empty responses.

Writeable for empty responses.

Attributes

Inherited from:
DefaultWriteables

Writeable for JsValue values that writes to UTF-8, so they can be sent with the application/json media type.

Writeable for JsValue values that writes to UTF-8, so they can be sent with the application/json media type.

Attributes

Inherited from:
DefaultWriteables
implicit def writeableOf_NodeBuffer(implicit codec: Codec): Writeable[NodeBuffer]

Writeable for NodeBuffer values - literal Scala XML.

Writeable for NodeBuffer values - literal Scala XML.

Attributes

Inherited from:
DefaultWriteables
implicit def writeableOf_NodeSeq[C <: NodeSeq](implicit codec: Codec): Writeable[C]

Writeable for NodeSeq values - literal Scala XML.

Writeable for NodeSeq values - literal Scala XML.

Attributes

Inherited from:
DefaultWriteables
implicit def writeableOf_XmlContent(implicit codec: Codec, ct: ContentTypeOf[Xml]): Writeable[Xml]

Writeable for play.twirl.api.Xml values. Trims surrounding whitespace.

Writeable for play.twirl.api.Xml values. Trims surrounding whitespace.

Attributes

Inherited from:
DefaultWriteables
implicit def writeableOf_urlEncodedForm(implicit codec: Codec): Writeable[Map[String, Seq[String]]]

Writeable for urlEncodedForm values

Writeable for urlEncodedForm values

Attributes

Inherited from:
DefaultWriteables