1 |
|
2 | import { DownloadOptions, HttpExecutor } from "builder-util-runtime";
|
3 | import { RequestOptions } from "http";
|
4 | import Session = Electron.Session;
|
5 | import ClientRequest = Electron.ClientRequest;
|
6 | export declare type LoginCallback = (username: string, password: string) => void;
|
7 | export declare const NET_SESSION_NAME = "electron-updater";
|
8 | export declare function getNetSession(): Session;
|
9 | export declare class ElectronHttpExecutor extends HttpExecutor<Electron.ClientRequest> {
|
10 | private readonly proxyLoginCallback?;
|
11 | private cachedSession;
|
12 | constructor(proxyLoginCallback?: ((authInfo: any, callback: LoginCallback) => void) | undefined);
|
13 | download(url: URL, destination: string, options: DownloadOptions): Promise<string>;
|
14 | createRequest(options: any, callback: (response: any) => void): any;
|
15 | protected addRedirectHandlers(request: ClientRequest, options: RequestOptions, reject: (error: Error) => void, redirectCount: number, handler: (options: RequestOptions) => void): void;
|
16 | }
|