miniget

  • Version 4.2.2
  • Published
  • 29.4 kB
  • No dependencies
  • MIT license

Install

npm i miniget
yarn add miniget
pnpm add miniget

Overview

A small HTTP(S) GET request library, with redirects and streaming.

Index

Variables

variable defaultOptions

var defaultOptions: {
maxRedirects: number;
maxRetries: number;
maxReconnects: number;
backoff: { inc: number; max: number };
};

    variable MinigetError

    var MinigetError: {
    new (message: string, statusCode?: number | undefined): {
    statusCode?: number | undefined;
    name: string;
    message: string;
    stack?: string | undefined;
    };
    captureStackTrace(
    targetObject: object,
    constructorOpt?: Function | undefined
    ): void;
    prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
    stackTraceLimit: number;
    };

      Functions

      function Miniget

      Miniget: typeof Miniget;

        Interfaces

        interface DefaultOptions

        interface DefaultOptions extends Options {}

          property backoff

          backoff: {
          inc: number;
          max: number;
          };

            property maxReconnects

            maxReconnects: number;

              property maxRedirects

              maxRedirects: number;

                property maxRetries

                maxRetries: number;

                  interface Options

                  interface Options extends RequestOptions {}

                    property acceptEncoding

                    acceptEncoding?: {
                    [key: string]: () => Transform;
                    };

                      property backoff

                      backoff?: {
                      inc: number;
                      max: number;
                      };

                        property highWaterMark

                        highWaterMark?: number;

                          property maxReconnects

                          maxReconnects?: number;

                            property maxRedirects

                            maxRedirects?: number;

                              property maxRetries

                              maxRetries?: number;

                                property transform

                                transform?: (parsedUrl: RequestOptions) => RequestOptions;

                                  interface Stream

                                  interface Stream extends PassThrough {}

                                    property abort

                                    abort: (err?: Error) => void;

                                      property aborted

                                      aborted: boolean;

                                        property destroy

                                        destroy: (err?: Error) => this;

                                          property destroyed

                                          destroyed: boolean;

                                            property text

                                            text: () => Promise<string>;

                                              method on

                                              on: {
                                              (
                                              event: 'reconnect',
                                              listener: (attempt: number, err?: Miniget.MinigetError) => void
                                              ): this;
                                              (event: 'retry', listener: (attempt: number, err?: Error) => void): this;
                                              (event: 'redirect', listener: (url: string) => void): this;
                                              (event: string | symbol, listener: (...args: any) => void): this;
                                              };

                                                Type Aliases

                                                type defaultOptions

                                                type defaultOptions = Miniget.Options;

                                                  type MinigetError

                                                  type MinigetError = Error;

                                                    Package Files (1)

                                                    Dependencies (0)

                                                    No dependencies.

                                                    Dev Dependencies (14)

                                                    Peer Dependencies (0)

                                                    No peer dependencies.

                                                    Badge

                                                    To add a badge like this onejsDocs.io badgeto 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/miniget.

                                                    • Markdown
                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/miniget)
                                                    • HTML
                                                      <a href="https://www.jsdocs.io/package/miniget"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>