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.


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



chunks: (() => AsyncIterable<Uint8Array>)

Type declaration

    • (): AsyncIterable<Uint8Array>
    • Iterate over payload chunks in segment number order.

      Returns AsyncIterable<Uint8Array>

count: number

Number of segments retrieved so far.

pipe: ((dest) => Promise<void>)

Type declaration

    • (dest): Promise<void>
    • Write all chunks to the destination stream.


      • dest: WritableStream

      Returns Promise<void>

unordered: (() => AsyncIterable<Data>)

Type declaration

    • (): AsyncIterable<Data>
    • Iterate over Data packets as they arrive, not sorted in segment number order.

      Returns AsyncIterable<Data>

Generated using TypeDoc