import { inflate, brotliDecompress, gunzip } from "node:zlib"; import { Dispatcher } from "undici"; declare const kDecompress: { gzip: typeof gunzip.__promisify__; "x-gzip": typeof gunzip.__promisify__; br: typeof brotliDecompress.__promisify__; deflate: typeof inflate.__promisify__; }; export type TypeOfDecompression = keyof typeof kDecompress; export type ModeOfHttpieResponseHandler = "decompress" | "parse" | "raw"; export declare class HttpieResponseHandler { response: Dispatcher.ResponseData; constructor(response: Dispatcher.ResponseData); getData(mode: "decompress" | "raw"): Promise; getData(mode?: "parse"): Promise; private getBuffer; private getDecompressedBuffer; /** * @description Parse Undici a buffer based on 'Content-Type' header. * If the response as a content type equal to 'application/json' we automatically parse it with JSON.parse(). */ private parseUndiciResponse; } export {};