statusUpdatesGet method

Future<Stream<Map<String, dynamic>>?> statusUpdatesGet(
  1. List postBody
)
inherited

statusUpdatesGet -> /v1/status/updates

Aggregates the data from one or more streaming endpoints into a single streaming endpoint. This endpoint is used to overcome a browser limit on the number of concurrent connections allowed. The following endpoints are permitted here:

In particular, all (and only) GET requests that return a chunked JSON response are legal URLs.

PARAMETERS

postBody (required) : This is the data that must be sent with this request.

Example (one_url):

[
  "status/slide"
]

Example (multi_urls):

[
  "status/slide",
  "timer/video_countdown",
  "presentation/current"
]

RESPONSE 200:

The request was processed successfully. A stream of updates will be returned to the client as they become available. Each update is separated by a CRLF pair, so a section of data followed by a CR-LF-CR-LF sequence is one update. Each update is a JSON object, as below.

content-type: application/json

schema:

{
  "type": "object",
  "required": []
}

RESPONSE 400:

The given request was invalid. This can be caused by a number of things:

  • The given URL was not found.
  • The given URL is not a streaming URL (i.e. it does not return a chunked response).
  • The given URL does not return a JSON data type.

The response body contains a list of URLs that were not valid.

content-type: application/json

schema:

{
  "type": "array",
  "required": []
}

Implementation

Future<Stream<Map<String, dynamic>>?> statusUpdatesGet(List postBody) async {
  String url = '/v1/status/updates';
  return callStream('get', url, data: postBody);
}