API Docs for: 5.4.0-alpha.78+806d39aa
Show:

Future Class

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;

Item Index

Methods

abort

(
  • [reason]
)
Void public

Cancel this request by firing the AbortController's signal.

Parameters:

  • [reason] String optional

    optional reason for aborting the request

Returns:

Void:

getStream

() Promise public

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

Returns:

Promise:

onFinalize

(
  • cb
)
public

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

Parameters:

  • cb Object

    the callback to run

Returns:

void