aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2017-12-06 20:43:31 +0100
committeradamw <adam@warski.org>2017-12-06 20:43:31 +0100
commit3fb284c3c8849baa0f7b0d34ee9be78af7935bb6 (patch)
tree7231538c4dea18f7fec658bb421b2315a43180a3 /docs
parenta70053c72809c2588716c371a4d4f2a7404106d6 (diff)
downloadsttp-3fb284c3c8849baa0f7b0d34ee9be78af7935bb6.tar.gz
sttp-3fb284c3c8849baa0f7b0d34ee9be78af7935bb6.tar.bz2
sttp-3fb284c3c8849baa0f7b0d34ee9be78af7935bb6.zip
#53: using proper encoding when reading the response body
Diffstat (limited to 'docs')
-rw-r--r--docs/responses/body.rst2
1 files changed, 1 insertions, 1 deletions
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.