insistir en compresióñ

This commit is contained in:
Cat /dev/Nulo 2023-12-22 13:50:02 -03:00
parent 1547a49bcf
commit 0826bd1441

View file

@ -4,7 +4,10 @@ import { pipeline } from "node:stream/promises";
export async function getHtml(url: string) { export async function getHtml(url: string) {
const res = await request(url, { const res = await request(url, {
headers: {}, headers: {
"Accept-Encoding": "gzip, deflate, br",
},
throwOnError: true,
}); });
let output: Buffer; let output: Buffer;
switch (res.headers["content-encoding"]) { switch (res.headers["content-encoding"]) {