Skip to content

Commit

Permalink
Removed extra call get request
Browse files Browse the repository at this point in the history
  • Loading branch information
DikoIbragimov committed Dec 13, 2024
1 parent e28be56 commit 40de885
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/RequestHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 40de885

Please sign in to comment.