public function getCaptcha($path)
{
$url = Config::get('url.login_captcha');
$cookie = new CookieJar();
$codePath = $path . sha1($this->getUsername() . '-' . microtime(true)) . '.gif';
$options = ['cookies' => $cookie, 'save_to' => $codePath];
$response = $this->request('get', [$url, [], $options]);
// Check the StatusCode
if ($response->getStatusCode() == 200) {
throw new HttpException('get the captcha failed!', 10005);
}
return $codePath;
}