eee
This commit is contained in:
+666
-638
File diff suppressed because it is too large
Load Diff
@@ -115,6 +115,11 @@ class CurlClient extends ClientAbstracts
|
||||
if ($method === self::POST || $method == self::UPLOAD) {
|
||||
curl_setopt($resource, CURLOPT_POST, 1);
|
||||
}
|
||||
[$proxy, $port] = [$this->getProxyHost(), $this->getProxyPort()];
|
||||
if (!empty($proxy) && $port > 0) {
|
||||
curl_setopt($resource, CURLOPT_PROXYPORT, $port);
|
||||
curl_setopt($resource, CURLOPT_PROXY, $proxy);
|
||||
}
|
||||
curl_setopt($resource, CURLOPT_CUSTOMREQUEST, strtoupper($method));
|
||||
$this->client = $resource;
|
||||
if (!empty($this->caPath)) {
|
||||
|
||||
@@ -19,6 +19,12 @@ trait TSwooleClient
|
||||
if ($this->getConnectTimeout() > 0) {
|
||||
$params['timeout'] = $this->getConnectTimeout();
|
||||
}
|
||||
|
||||
[$proxy, $port] = [$this->getProxyHost(), $this->getProxyPort()];
|
||||
if (!empty($proxy) && $port > 0) {
|
||||
$params['http_proxy_host'] = $proxy;
|
||||
$params['http_proxy_port'] = $port;
|
||||
}
|
||||
if (empty($sslCert) || empty($sslKey) || empty($sslCa)) {
|
||||
return $params;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user