Options
All
  • Public
  • Public/Protected
  • All
Menu

Return type of fetch() function.

Fetch output may be accessed in one of several formats:

  • await result resolves to the reassembled object as Uint8Array.
  • for await (const packet of result) iterates over Data packets in segment number order.
  • more formats available as methods.

Result is lazy. Fetching starts when an output format is accessed. You may only access one output format on a Result instance. Formats other than await result can be accessed only once.

Hierarchy

  • PromiseLike<Uint8Array>
  • AsyncIterable<Data>
    • Result

Index

Properties

Methods

Properties

count: number

Number of segments retrieved so far.

Methods

  • chunks(): AsyncIterable<Uint8Array>
  • pipe(dest: WritableStream): Promise<void>
  • unordered(): AsyncIterable<Data>

Generated using TypeDoc