protected function getDefaultOptions() { $options = parent::getDefaultOptions(); if ($this->shouldSendToken) { $options['cookies'] = ['auth_tkt' => $this->getToken()]; } return $options; }
protected function getDefaultOptions() { $options = parent::getDefaultOptions(); if ($this->requiresToken) { $options['headers'] = ['Authorization' => 'Bearer ' . $this->getToken()]; } return $options; }