Character encodings and the HTTP client
HTTP client

Prev:TRACE requests with the HTTP client
Next:HTTP client errors


The http-request, http-get and http-post words output a sequence containing data that was sent by the server.

If the server specifies a content-type header with a character encoding, the HTTP client decodes the data using this character encoding, and the sequence will be a string.

If no encoding was specified but the MIME type is a text type, the latin1 encoding is assumed, and the sequence will be a string.

For any other MIME type, the binary encoding is assumed, and thus the data is returned literally in a byte array.