mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-23 06:36:19 +00:00
insistir en compresióñ
This commit is contained in:
parent
1547a49bcf
commit
0826bd1441
1 changed files with 4 additions and 1 deletions
|
@ -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"]) {
|
||||||
|
|
Loading…
Reference in a new issue