electron-builder-http
- Version 19.27.5
- Published
- 3 dependencies
- MIT license
Install
npm i electron-builder-http
yarn add electron-builder-http
pnpm add electron-builder-http
Overview
Part of [electron-builder](https://github.com/electron-userland/electron-builder).
Index
Functions
Classes
Interfaces
Functions
function configureRequestOptions
configureRequestOptions: ( options: RequestOptions, token?: string | null, method?: 'GET' | 'DELETE' | 'PUT') => RequestOptions;
function configureRequestOptionsFromUrl
configureRequestOptionsFromUrl: ( url: string, options: RequestOptions) => RequestOptions;
function dumpRequestOptions
dumpRequestOptions: (options: RequestOptions) => string;
function parseJson
parseJson: (result: Promise<string | null>) => Promise<any>;
function safeGetHeader
safeGetHeader: (response: any, headerKey: string) => any;
Classes
class CancellationError
class CancellationError extends Error {}
constructor
constructor();
class CancellationToken
class CancellationToken extends EventEmitter {}
constructor
constructor(parent?: CancellationToken);
property cancelled
readonly cancelled: boolean;
property parent
parent: CancellationToken;
method cancel
cancel: () => void;
method createPromise
createPromise: <R>( callback: ( resolve: (thenableOrResult?: R) => void, reject: (error?: Error) => void, onCancel: (callback: () => void) => void ) => void) => Promise<R>;
method dispose
dispose: () => void;
class DigestTransform
class DigestTransform extends Transform {}
constructor
constructor( expected: string, algorithm: string, encoding: 'hex' | 'base64' | 'latin1');
class HttpError
class HttpError extends Error {}
constructor
constructor( response: { statusMessage?: string | undefined; statusCode?: number | undefined; headers?: { [key: string]: string[] }; }, description?: any);
property description
description: any;
property response
readonly response: { statusMessage?: string | undefined; statusCode?: number | undefined; headers?: { [key: string]: string[] };};
class HttpExecutor
abstract class HttpExecutor<REQUEST> {}
property maxRedirects
protected readonly maxRedirects: number;
method addTimeOutHandler
protected addTimeOutHandler: ( request: any, callback: (error: Error) => void) => void;
method doApiRequest
protected abstract doApiRequest: ( options: RequestOptions, cancellationToken: CancellationToken, requestProcessor: (request: REQUEST, reject: (error: Error) => void) => void, redirectCount: number) => Promise<string>;
method doDownload
protected doDownload: ( requestOptions: any, destination: string, redirectCount: number, options: DownloadOptions, callback: (error: Error | null) => void, onCancel: (callback: () => void) => void) => void;
method doRequest
protected abstract doRequest: ( options: any, callback: (response: any) => void) => any;
method handleResponse
protected handleResponse: ( response: Response, options: RequestOptionsEx, cancellationToken: CancellationToken, resolve: (data?: any) => void, reject: (error: Error) => void, redirectCount: number, requestProcessor: (request: REQUEST, reject: (error: Error) => void) => void) => void;
method request
request: ( options: RequestOptions, cancellationToken?: CancellationToken, data?: { [name: string]: any }) => Promise<string | null>;
class ProgressCallbackTransform
class ProgressCallbackTransform extends Transform {}
constructor
constructor( total: number, cancellationToken: CancellationToken, onProgress: (info: ProgressInfo) => any);
Interfaces
interface DownloadOptions
interface DownloadOptions {}
property cancellationToken
readonly cancellationToken: CancellationToken;
property headers
readonly headers?: OutgoingHttpHeaders | null;
property sha2
readonly sha2?: string | null;
property sha512
readonly sha512?: string | null;
property skipDirCreation
readonly skipDirCreation?: boolean;
method onProgress
onProgress: (progress: ProgressInfo) => void;
interface ProgressInfo
interface ProgressInfo {}
property bytesPerSecond
bytesPerSecond: number;
property delta
delta: number;
property percent
percent: number;
property total
total: number;
property transferred
transferred: number;
interface RequestHeaders
interface RequestHeaders extends OutgoingHttpHeaders {}
index signature
[key: string]: string;
interface RequestOptionsEx
interface RequestOptionsEx extends RequestOptions {}
interface Response
interface Response extends EventEmitter {}
property headers
headers: any;
property statusCode
statusCode?: number;
property statusMessage
statusMessage?: string;
method setEncoding
setEncoding: (encoding: string) => void;
Package Files (3)
Dependencies (3)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/electron-builder-http
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/electron-builder-http)
- HTML<a href="https://www.jsdocs.io/package/electron-builder-http"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2927 ms. - Missing or incorrect documentation? Open an issue for this package.