add clear
This commit is contained in:
@@ -348,7 +348,6 @@ class HttpClient
|
|||||||
$this->host = System::gethostbyname($this->host);
|
$this->host = System::gethostbyname($this->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
var_dump($this->host);
|
|
||||||
if (!$this->checkIsIp($this->host) && !$this->isDomainName($this->host)) {
|
if (!$this->checkIsIp($this->host) && !$this->isDomainName($this->host)) {
|
||||||
throw new Exception('Client Host error.');
|
throw new Exception('Client Host error.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ class Account extends SmallProgram
|
|||||||
|
|
||||||
private $wxaqr = 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=';
|
private $wxaqr = 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=';
|
||||||
private $getwxacode = 'https://api.weixin.qq.com/wxa/getwxacode?access_token=';
|
private $getwxacode = 'https://api.weixin.qq.com/wxa/getwxacode?access_token=';
|
||||||
private $publicInfo = 'https://api.weixin.qq.com/cgi-bin/user/info';
|
|
||||||
private $getwxacodeunlimit = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=';
|
private $getwxacodeunlimit = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=';
|
||||||
|
|
||||||
private $savePath = __DIR__ . '/../../Users/';
|
private $savePath = __DIR__ . '/../../Users/';
|
||||||
@@ -73,9 +72,11 @@ class Account extends SmallProgram
|
|||||||
|
|
||||||
$this->request->setMethod(HttpClient::GET);
|
$this->request->setMethod(HttpClient::GET);
|
||||||
$this->request->setIsSSL(true);
|
$this->request->setIsSSL(true);
|
||||||
|
$this->request->setHost('api.weixin.qq.com');
|
||||||
|
$this->request->addHeader('Host', 'api.weixin.qq.com');
|
||||||
$this->request->setErrorField('errcode');
|
$this->request->setErrorField('errcode');
|
||||||
$this->request->setErrorMsgField('errmsg');
|
$this->request->setErrorMsgField('errmsg');
|
||||||
return $this->request->get($this->publicInfo, $query);
|
return $this->request->get('user/info', $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user