requestCaptcha static method
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']);
}