22 lines
773 B
TypeScript
22 lines
773 B
TypeScript
/// <reference types="node" />
|
|
/// <reference types="node" />
|
|
import { IncomingMessage } from 'http';
|
|
import { RequestOptions } from 'https';
|
|
export declare class Follow {
|
|
follow: URL;
|
|
constructor(follow: URL);
|
|
}
|
|
export declare class Stop {
|
|
stop: URL;
|
|
constructor(stop: URL);
|
|
}
|
|
export interface TallPlugin {
|
|
(url: URL, response: IncomingMessage, previous: Follow | Stop): Promise<Follow | Stop>;
|
|
}
|
|
export declare function locationHeaderPlugin(url: URL, response: IncomingMessage, previous: Follow | Stop): Promise<Follow | Stop>;
|
|
export interface TallOptions extends RequestOptions {
|
|
maxRedirects: number;
|
|
timeout: number;
|
|
plugins: TallPlugin[];
|
|
}
|
|
export declare const tall: (url: string, options?: Partial<TallOptions>) => Promise<string>;
|