Class Future

public

A Future is a Promise which resolves to a StructuredDocument while providing the ability to abort the underlying request, getStream the response before the outer promise resolves;

Show:

reason
String

optional reason for aborting the request

returns
Void

Cancel this request by firing the AbortController's signal.

returns
Promise<ReadableStream | null>

Get the response stream, if any, once made available.

cb

the callback to run

returns

void

Run a callback when this request completes. Use sparingly, mostly useful for instrumentation and infrastructure.