diff --git a/src/RequestHeaders.php b/src/RequestHeaders.php index 9d8ff26..2fc100a 100644 --- a/src/RequestHeaders.php +++ b/src/RequestHeaders.php @@ -26,7 +26,8 @@ public function __construct( * @return string|null The header value as a string, or null if the header is not present. */ public function getHeaderLine(string $name, string|null $default = null): string|null { - return $this->requestProvider->get()->hasHeader($name) ? $this->requestProvider->get()->getHeaderLine($name) : $default; + $request = $this->requestProvider->get(); + return $request->hasHeader($name) ? $request->getHeaderLine($name) : $default; } /**