daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Future<List<int>> status() async {
  2.    var data = new http.Client();
  3.      String basicAuth =
  4.     'Basic ' + base64Encode(utf8.encode('$username:$password'));
  5. List<String> itemsIds = ['new', 'open', 'stalled', 'resolved'];
  6.  
  7. return Future.wait<>(['new', 'open', 'stalled', 'resolved'].map((item) =>
  8. data.get(Uri.encodeFull("sampleapi'and(status='$item')/" + '/next'),headers:{'authorization': basicAuth}.then((response) {
  9.  
  10.   })
  11. )
  12. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top