改名
This commit is contained in:
@@ -7,6 +7,7 @@ namespace HttpServer\Client;
|
||||
use Closure;
|
||||
use Exception;
|
||||
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Snowflake\Abstracts\Component;
|
||||
use Snowflake\Core\Help;
|
||||
use Snowflake\Core\Json;
|
||||
@@ -58,7 +59,7 @@ abstract class ClientAbstracts extends Component implements IClient
|
||||
/**
|
||||
* @return static
|
||||
*/
|
||||
public static function NewRequest(): static
|
||||
#[Pure] public static function NewRequest(): static
|
||||
{
|
||||
return new static();
|
||||
}
|
||||
|
||||
@@ -50,14 +50,13 @@ class Curl extends ClientAbstracts
|
||||
if ($isHttps !== false) {
|
||||
$this->curlHandlerSslSet($resource);
|
||||
}
|
||||
if (empty($params)) {
|
||||
if (empty($params) && empty($this->getData())) {
|
||||
return $resource;
|
||||
}
|
||||
|
||||
if ($method === self::GET && !empty($this->getData())) {
|
||||
curl_setopt($resource, CURLOPT_POSTFIELDS, $this->getData());
|
||||
}
|
||||
if ($method === self::POST) {
|
||||
} else if ($method === self::POST) {
|
||||
curl_setopt($resource, CURLOPT_POSTFIELDS, $this->mergeParams($params));
|
||||
}
|
||||
if ($method === self::UPLOAD) {
|
||||
|
||||
Reference in New Issue
Block a user