add clear
This commit is contained in:
@@ -217,7 +217,6 @@ class HttpClient
|
|||||||
private function request($url, $data = [])
|
private function request($url, $data = [])
|
||||||
{
|
{
|
||||||
$data = $this->paramEncode($data);
|
$data = $this->paramEncode($data);
|
||||||
var_dump($this->use_swoole);
|
|
||||||
if ($this->use_swoole === false) {
|
if ($this->use_swoole === false) {
|
||||||
return $this->useCurl($url, $data);
|
return $this->useCurl($url, $data);
|
||||||
} else if ($this->use_swoole) {
|
} else if ($this->use_swoole) {
|
||||||
|
|||||||
@@ -88,9 +88,7 @@ abstract class Miniprogarampage implements Progaram
|
|||||||
}
|
}
|
||||||
static::$instance->config = $config;
|
static::$instance->config = $config;
|
||||||
static::$instance->request->setAgent($config->getAgent());
|
static::$instance->request->setAgent($config->getAgent());
|
||||||
if ($config->isUsrSwoole()) {
|
static::$instance->request->setUseSwoole($config->isUsrSwoole());
|
||||||
static::$instance->request->setUseSwoole(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = static::$instance->request;
|
$request = static::$instance->request;
|
||||||
if ($request->getIsSSL()) {
|
if ($request->getIsSSL()) {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class Account extends SmallProgram
|
|||||||
$this->request->setHost('api.q.qq.com');
|
$this->request->setHost('api.q.qq.com');
|
||||||
$this->request->setMethod(HttpClient::GET);
|
$this->request->setMethod(HttpClient::GET);
|
||||||
$this->request->addHeader('Content-Type', 'text/xml');
|
$this->request->addHeader('Content-Type', 'text/xml');
|
||||||
|
// $this->request->setUseSwoole($this->config->isUsrSwoole());
|
||||||
|
|
||||||
return $this->request->get('sns/jscode2session', $param);
|
return $this->request->get('sns/jscode2session', $param);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user