diff --git a/wchat/wx/Account.php b/wchat/wx/Account.php index 64ccacb..d5f1a80 100644 --- a/wchat/wx/Account.php +++ b/wchat/wx/Account.php @@ -70,13 +70,16 @@ class Account extends SmallProgram 'lang' => 'zh_CN' ]; - $this->request->setMethod(HttpClient::GET); - $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->setErrorMsgField('errmsg'); - return $this->request->get('user/info', $query); + $client = HttpClient::NewRequest(); + $client->setAgent($this->config->getAgent()); + $client->setUseSwoole($this->config->isUsrSwoole()); + $client->setMethod(HttpClient::GET); + $client->setIsSSL(true); + $client->setHost('api.weixin.qq.com'); + $client->addHeader('Host', 'api.weixin.qq.com'); + $client->setErrorField('errcode'); + $client->setErrorMsgField('errmsg'); + return $client->get('user/info', $query); }