requestCaptcha static method

Future<LCCaptcha> requestCaptcha({
  1. int width = 85,
  2. int height = 39,
})

Requests a CAPTCHA image (width x height) from LeanCloud.

LeanCloud will send back a LCCaptcha.

Implementation

static Future<LCCaptcha> requestCaptcha(
    {int width = 85, int height = 39}) async {
  String path = 'requestCaptcha';
  Map<String, dynamic> params = {'width': width, 'height': height};
  Map response = await LeanCloud._httpClient.get(path, queryParams: params);
  return new LCCaptcha(response['captcha_url'], response['captcha_token']);
}