A framework for building convergent cross-platform Nextcloud clients using Flutter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
387 B

// ignore_for_file: public_member_api_docs
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
extension HttpClientResponseBody on HttpClientResponse {
Future<Uint8List> get bodyBytes async =>
Uint8List.fromList((await toList()).reduce((final value, final element) => [...value, ...element]));
Future<String> get body async => utf8.decode(await bodyBytes);
}