eee
This commit is contained in:
+9
-4
@@ -34,11 +34,16 @@ class CoroutineClient extends ClientAbstracts
|
|||||||
if (!str_starts_with($path, '/')) {
|
if (!str_starts_with($path, '/')) {
|
||||||
$path = '/' . $path;
|
$path = '/' . $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$host = $this->getHost();
|
||||||
|
if (!preg_match('/(\d{1,3}\.){3}\d{1,3}/', $host)) {
|
||||||
|
$this->withAddedHeader('Host', $host);
|
||||||
|
}
|
||||||
$this->withMethod($method)
|
$this->withMethod($method)
|
||||||
->coroutine(
|
->coroutine(
|
||||||
$path,
|
$path,
|
||||||
$this->paramEncode($params)
|
$this->paramEncode($params)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user