Bitpay\Client\Client::addIdentityHeader PHP Method

addIdentityHeader() protected method

protected addIdentityHeader ( Bitpay\Client\RequestInterface $request )
$request Bitpay\Client\RequestInterface
    protected function addIdentityHeader(RequestInterface $request)
    {
        if (null === $this->publicKey) {
            throw new \Exception('Please set your Public Key.');
        }
        $request->setHeader('x-identity', (string) $this->publicKey);
    }