export interface RecordOptions { dont_print: boolean; output_objects: boolean; use_separator: boolean; enable_reqheaders_recording: boolean; } export declare class HttpRecorder { private readonly path; /** * Constructs an HttpRecorder with the path of the cassette to load * or save to. * @param path The path to the cassette */ constructor(path: string); /** * Start will record all http activity to the cassette if it does not * exist or playback a previous http requests if a cassette is present. * * Important: Make sure to call @method stop after. * @param options Optional options to change the default ones */ start(options?: Partial): void; /** * * Call this to enable connections to happen with specific hosts (if a host * argument is provided) or with any reachable host when the recorder is in * play mode. * If a request is in the cassette, it will be returned from there, but if it * isn't and netConnect was enabled it will be retrieved from the server. * @param host Optional The host or IP that will be enabled (can be a regexp) */ enableNetConnect(host?: string | RegExp): void; /** * Stop should be called after @method start * It will write to the cassette file if it does not exist and * restore nock to avoid intercepting future http requests. */ stop(checkAllRan?: boolean): void; private record; private play; private writeToFile; isCassetteLoaded(): boolean; isActive(): boolean; getPath(): string; }