objects<S, T> method

Stream<T> objects<S, T>(
  1. String method,
  2. String path,
  3. JSONConverter<S, T> converter, {
  4. int? pages,
  5. Map<String, String>? headers,
  6. Map<String, dynamic>? params,
  7. String? body,
  8. int statusCode = 200,
  9. String? preview,
  10. String? arrayKey,
})

If the response body is a JSONObject (and not a JSONArray), use arrayKey to specify the key under which the array is stored.

Implementation

Stream<T> objects<S, T>(
  String method,
  String path,
  JSONConverter<S, T> converter, {
  int? pages,
  Map<String, String>? headers,
  Map<String, dynamic>? params,
  String? body,
  int statusCode = 200,
  String? preview,
  String? arrayKey,
}) {
  return jsonObjects<S>(
    method,
    path,
    pages: pages,
    headers: headers,
    params: params,
    body: body,
    statusCode: statusCode,
    preview: preview,
    arrayKey: arrayKey,
  ).map(converter);
}