getCookie method

  1. @override
void getCookie(
  1. String url,
  2. JSPromise promise
)
override

Implementation

@override
void getCookie(String url, JSPromise promise) {
  channel.CookieManager.getInstance().getCookie(url).then((value) {
    var cookieList = value;
    var result = '';
    for (var item in cookieList) {
      result += '${item.name}=${item.value};';
    }
    promise.resolve(result);
  }).catchError((error) {
    promise.reject(error);
  });
}