mindee
    Preparing search index...

    Class UrlInput

    Remote input source represented by a validated HTTPS URL.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    dispatcher: Dispatcher

    Dispatcher used for HTTP requests.

    fileObject: string | Buffer<ArrayBufferLike> = ""

    The file object used by the input source.

    initialized: boolean = false

    Whether the source has already been initialized.

    url: string

    HTTPS URL of the remote input file.

    Methods

    • Downloads the URL content and returns it as a local bytes source.

      Parameters

      • options: {
            filename?: string;
            headers?: Record<string, string>;
            maxRedirects?: number;
            password?: string;
            token?: string;
            username?: string;
        } = {}

      Returns Promise<BytesInput>

    • Downloads the URL content and writes it to disk.

      Parameters

      • options: {
            filename?: string;
            filepath: string;
            headers?: Record<string, string>;
            maxRedirects?: number;
            password?: string;
            token?: string;
            username?: string;
        }

      Returns Promise<string>

    • Validates that a URL is safe to fetch: scheme must be https.

      Parameters

      • url: string

      Returns void