play.api.libs.ws.DefaultBodyReadables
See theDefaultBodyReadables companion trait
object DefaultBodyReadables extends DefaultBodyReadables
Attributes
- Companion
- trait
- Graph
-
- Supertypes
- Self type
-
DefaultBodyReadables.type
Members list
Implicits
Inherited implicits
Converts a response body into Array[Byte].
Converts a response body into Array[Byte].
import play.api.libs.ws.DefaultBodyReadables._
def example(response: play.api.libs.ws.StandaloneWSResponse): Array[Byte] =
response.body[Array[Byte]]
Attributes
- Inherited from:
- DefaultBodyReadables
Converts a response body into a read only ByteBuffer.
Converts a response body into a read only ByteBuffer.
import java.nio.ByteBuffer
import play.api.libs.ws.DefaultBodyReadables._
def example(response: play.api.libs.ws.StandaloneWSResponse): ByteBuffer =
response.body[ByteBuffer]
Attributes
- Inherited from:
- DefaultBodyReadables
Converts a response body into an org.apache.pekko.util.ByteString:
Converts a response body into an org.apache.pekko.util.ByteString:
import org.apache.pekko.util.ByteString
import play.api.libs.ws.DefaultBodyReadables._
def example(response: play.api.libs.ws.StandaloneWSResponse): ByteString =
response.body[ByteString]
Attributes
- Inherited from:
- DefaultBodyReadables
Converts a response body into Source[ByteString, _].
Converts a response body into Source[ByteString, _].
Attributes
- Inherited from:
- DefaultBodyReadables
Converts a response body into a String.
Converts a response body into a String.
Note: this is only a best-guess effort and does not handle all content types. See StandaloneWSResponse.body:String* for more information.
import play.api.libs.ws.DefaultBodyReadables._
def example(response: play.api.libs.ws.StandaloneWSResponse): String =
response.body[String]
Attributes
- Inherited from:
- DefaultBodyReadables
In this article