fix buffer encoding

This commit is contained in:
DIYgod
2019-04-18 00:20:39 +08:00
parent de32ba0ffe
commit 07b2771b63
+7
View File
@@ -56,6 +56,13 @@ const custom = got.extend({
return error;
},
],
beforeRequest: [
(options) => {
if (options.responseType === 'buffer') {
options.encoding = null;
}
},
],
},
agent: agent,
headers: {