Function getUri

  • Async function that returns a stream.Readable instance that will output the contents of the given URI.

    For caching purposes, you can pass in a stream instance from a previous getUri() call as a cache: stream option, and if the destination has not changed since the last time the endpoint was retreived then the callback will be invoked with an Error object with code set to "ENOTMODIFIED" and null for the "stream" instance argument. In this case, you can skip retreiving the file again and continue to use the previous payload.

    Type Parameters

    • Uri extends string

    Parameters

    • uri: URL | Uri

      URI to retrieve

    • Optional opts: ProtocolOpts<Uri>

      optional "options" object

    Returns Promise<Readable>

    Api

    public

Generated using TypeDoc