| Constructor and Description |
|---|
RequestBody(Object body) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
as(Class<T> tType)
Cast this RequestBody as T if possible.
|
ByteString |
asBytes()
The request content as a ByteString.
|
Map<String,String[]> |
asFormUrlEncoded()
The request content parsed as URL form-encoded.
|
com.fasterxml.jackson.databind.JsonNode |
asJson()
The request content as Json.
|
<A> Http.MultipartFormData<A> |
asMultipartFormData()
The request content parsed as multipart form data.
|
Http.RawBuffer |
asRaw()
The request content as Array bytes.
|
String |
asText()
The request content as text.
|
Document |
asXml()
The request content as XML.
|
String |
toString() |
public RequestBody(Object body)
public <A> Http.MultipartFormData<A> asMultipartFormData()
A - the file type (e.g. play.api.libs.Files.TemporaryFile)public Map<String,String[]> asFormUrlEncoded()
public Http.RawBuffer asRaw()
public String asText()
public Document asXml()
public com.fasterxml.jackson.databind.JsonNode asJson()
public ByteString asBytes()
public <T> T as(Class<T> tType)
T - type of the provided tTypetType - class that we are trying to cast the body as