Implementation
Future<http.Response> getAllReadChapters(
String token, List<String> mangaIds) async {
// get all read chapters in the given mangaIds,
// please note it returns an http response since the response is not always of the same schema.
var unencodedPath = '/manga/read';
var _ids = '';
mangaIds.forEach((element) {
_ids = _ids + '&ids[]=$element';
});
print(_ids);
final uri = 'https://$authority/$unencodedPath?$_ids';
var response = await http.get(Uri.parse(uri), headers: {
HttpHeaders.contentTypeHeader: 'application/json',
HttpHeaders.authorizationHeader: 'Bearer $token'
});
return response;
}