Update https.js

This commit is contained in:
Jasper 2022-09-10 11:43:59 +10:00
parent ddc5ef2908
commit 369de297ee
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ export function get(url, options = {}, callback) {
Remote.https.get(url, options, (error, res, body) => {
if (error) return emitter.emit("error", error);
emitter.emit("data", options.encoding === "binary" ? Buffer.from(body, "binary") : body);
emitter.emit("data", Buffer.from(body, options.encoding));
emitter.emit("end", res);
});