src/main/php/response/WebResponse.php
public function containsHeader(string $name, string $value = null): bool
    {
        if ($this->headers->contain($name)) {
            if (null !== $value) {
                return $value === $this->headers[$name];
            }

            return true;
        }

        return false;
    }
public function containsHeader(string $name, string $value = null): bool
    {
        if ($this->headers->contain($name)) {
            if (null !== $value) {
                return $value === $this->headers[$name];
            }

            return true;
        }

        return false;
    }
public function containsHeader ( string $ name , string $ value = null ) : bool { if ( $ this -> headers -> contain ( $ name ) ) { if ( null !== $ value ) { return $ value === $ this -> headers [ $ name ] ; } return true ; } return false ; }
check if response contains a certain header

@param   string  $name   name of header to check
@param   string  $value  optional  if given the value is checked as well
@return  bool
@since   4.0.0
check if response contains a certain header