Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Future<List<int>> status() async {
- var data = new http.Client();
- String basicAuth =
- 'Basic ' + base64Encode(utf8.encode('$username:$password'));
- List<String> itemsIds = ['new', 'open', 'stalled', 'resolved'];
- return Future.wait<>(['new', 'open', 'stalled', 'resolved'].map((item) =>
- data.get(Uri.encodeFull("sampleapi'and(status='$item')/" + '/next'),headers:{'authorization': basicAuth}.then((response) {
- })
- )
- );
Add Comment
Please, Sign In to add comment