This commit is contained in:
xl
2023-11-07 16:16:34 +08:00
parent 9e062a7a33
commit fd61b6f1d9
+9 -4
View File
@@ -34,11 +34,16 @@ class CoroutineClient extends ClientAbstracts
if (!str_starts_with($path, '/')) {
$path = '/' . $path;
}
$host = $this->getHost();
if (!preg_match('/(\d{1,3}\.){3}\d{1,3}/', $host)) {
$this->withAddedHeader('Host', $host);
}
$this->withMethod($method)
->coroutine(
$path,
$this->paramEncode($params)
);
->coroutine(
$path,
$this->paramEncode($params)
);
}