From 3fb284c3c8849baa0f7b0d34ee9be78af7935bb6 Mon Sep 17 00:00:00 2001 From: adamw Date: Wed, 6 Dec 2017 20:43:31 +0100 Subject: #53: using proper encoding when reading the response body --- docs/responses/body.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/responses') diff --git a/docs/responses/body.rst b/docs/responses/body.rst index 10658ed..7b45fbc 100644 --- a/docs/responses/body.rst +++ b/docs/responses/body.rst @@ -3,7 +3,7 @@ Response body specification =========================== -By default, the received response body will be read as a ``String``, using the ``UTF-8`` encoding. This is of course configurable: response bodies can be ignored, deserialized into custom types, recevied as a stream or saved to a file. +By default, the received response body will be read as a ``String``, using the encoding specified in the ``Content-Type`` response header (and if none is specified, using ``UTF-8``). This is of course configurable: response bodies can be ignored, deserialized into custom types, received as a stream or saved to a file. How the response body will be read is part of the request definition, as already when sending the request, the backend needs to know what to do with the response. The type to which the response body should be deserialized is the second type parameter of ``RequestT``, and stored in the request definition as the ``request.response: ResponseAs[T, S]`` property. -- cgit v1.2.3