Пример #1
0
 protected function getDefaultOptions()
 {
     $options = parent::getDefaultOptions();
     if ($this->shouldSendToken) {
         $options['cookies'] = ['auth_tkt' => $this->getToken()];
     }
     return $options;
 }
Пример #2
0
 protected function getDefaultOptions()
 {
     $options = parent::getDefaultOptions();
     if ($this->requiresToken) {
         $options['headers'] = ['Authorization' => 'Bearer ' . $this->getToken()];
     }
     return $options;
 }