CodeExplorer assertMethod example
public function __construct( string
$method,
$uri,
array
$headers =
[],
$body = null,
string
$version = '1.1'
) { $this->
assertMethod($method);
if (!
($uri instanceof UriInterface
)) { $uri =
new Uri($uri);
} $this->method =
strtoupper($method);
$this->uri =
$uri;
$this->
setHeaders($headers);
$this->protocol =
$version;
if (!
isset($this->headerNames
['host'
])) { $this->
updateHostFromUri();
}