@b-jones-rfd/sp-rest-connect - v5.1.1
    Preparing search index...

    Interface GetDocumentFromLibraryOptions

    Options accepted by every action in addition to its own parameters.

    interface GetDocumentFromLibraryOptions {
        binary?: boolean;
        fileName: string;
        folder: string;
        signal?: AbortSignal;
        timeout?: number;
    }

    Hierarchy (View Summary)

    Index
    binary?: boolean

    Return the file as a Buffer. Setting this to false decodes the body as UTF-8 text, which fails the Buffer check and yields a Failure; there is no reason to change it.

    true

    fileName: string

    File name, including extension.

    folder: string

    Folder containing the file, relative to serverRelativeUrl.

    signal?: AbortSignal

    Cancels the request. Abort yields a Failure with code ABORTED.

    connection.getListContents({ listName: 'Tasks', signal: AbortSignal.timeout(5000) })
    
    timeout?: number

    Socket inactivity timeout in milliseconds: the request fails with code TIMEOUT if no bytes arrive for this long. It is not a cap on total duration; use signal with AbortSignal.timeout() for that. Omit for no timeout.