sttp.client4.ResponseAs
See theResponseAs companion object
case class ResponseAs[+T](delegate: GenericResponseAs[T, Any]) extends ResponseAsDelegate[T, Any]
Describes how the response body of a Request should be handled.
Apart from the basic cases (ignoring, reading as a byte array or file), response body descriptions can be mapped over, to support custom types. The mapping can take into account the ResponseMetadata, that is the headers and status code. Responses can also be handled depending on the response metadata. Finally, two response body descriptions can be combined (with some restrictions).
A number of as<Type>
helper methods are available as part of SttpApi and when importing sttp.client4._
.
Type parameters
- T
-
Target type as which the response will be read.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article