This commit is contained in:
as2252258@163.com
2021-08-06 02:03:01 +08:00
parent f4acafe8de
commit 857d5c0e13
+2 -2
View File
@@ -40,9 +40,9 @@ trait HttpHeaders
* @param $name * @param $name
* @return mixed|null * @return mixed|null
*/ */
public function getHeader($name): mixed public function getHeader($name, $default = null): mixed
{ {
return $this->_headers[$name]; return $this->_headers[$name] ?? $default;
} }