mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Adds option to specify character set in responses when using http adapter
This commit is contained in:
@@ -185,7 +185,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;
|
||||
|
||||
Reference in New Issue
Block a user