This commit is contained in:
2021-11-29 11:51:19 +08:00
parent af9b88f114
commit 0a54c021b9
+11 -3
View File
@@ -9,7 +9,6 @@ use Http\Message\Stream;
use JetBrains\PhpStorm\Pure;
use Kiri\Context;
use Kiri\Core\Help;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
use Swoole\Coroutine\System;
@@ -48,7 +47,6 @@ abstract class ClientAbstracts implements IClient
private int $port = 80;
private array $_responseHeader = [];
@@ -84,12 +82,22 @@ abstract class ClientAbstracts implements IClient
/**
* @return array
*/
public function getResponseHeader(): array
public function getResponseHeaders(): array
{
return $this->_responseHeader;
}
/**
* @param string $key
* @return string|int|null
*/
public function getResponseHeader(string $key): null|string|int
{
return $this->_responseHeader[$key] ?? null;
}
/**
* @param array $responseHeader
*/