Detect encoding in Response::text() (#256)

* Detect encoding and decode text response

Fixes #246

* Try to get encoding from Content-Type header

* Remove uchardet encoding detection for now

* Add non utf-8 test case for Response::text()

* Reduce copies
This commit is contained in:
messense
2018-02-16 03:01:57 +08:00
committed by Sean McArthur
parent f241fce38d
commit 0203fad886
4 changed files with 66 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ categories = ["web-programming::http-client"]
[dependencies]
bytes = "0.4"
encoding_rs = "0.7"
futures = "0.1.15"
hyper = "0.11.9"
hyper-tls = "0.1.2"