import { Options as GotOptions, Response } from 'got';
export interface PeerTubeRequestError extends Error {
    statusCode?: number;
    responseBody?: any;
    responseHeaders?: any;
}
declare type PeerTubeRequestOptions = {
    timeout?: number;
    activityPub?: boolean;
    bodyKBLimit?: number;
    httpSignature?: {
        algorithm: string;
        authorizationHeaderName: string;
        keyId: string;
        key: string;
        headers: string[];
    };
    jsonResponse?: boolean;
} & Pick<GotOptions, 'headers' | 'json' | 'method' | 'searchParams'>;
declare const peertubeGot: import("got").Got;
declare function doRequest(url: string, options?: PeerTubeRequestOptions): Promise<Response<string>>;
declare function doJSONRequest<T>(url: string, options?: PeerTubeRequestOptions): Promise<Response<T>>;
declare function doRequestAndSaveToFile(url: string, destPath: string, options?: PeerTubeRequestOptions): Promise<void>;
declare function downloadImage(url: string, destDir: string, destName: string, size: {
    width: number;
    height: number;
}): Promise<void>;
declare function isBinaryResponse(result: Response<any>): boolean;
declare function findLatestRedirection(url: string, options: PeerTubeRequestOptions, iteration?: number): any;
export { doRequest, doJSONRequest, doRequestAndSaveToFile, isBinaryResponse, downloadImage, findLatestRedirection, peertubeGot };
//# sourceMappingURL=requests.d.ts.map