2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Merge pull request #869 from johntron/master

Adds option to specify character set in responses (with http adapter)
This commit is contained in:
Nick Uraltsev
2018-03-10 09:13:04 -08:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ module.exports = function httpAdapter(config) {
stream.on('end', function handleStreamEnd() {
var responseData = Buffer.concat(responseBuffer);
if (config.responseType !== 'arraybuffer') {
responseData = responseData.toString('utf8');
responseData = responseData.toString(config.responseEncoding);
}
response.data = responseData;