protected function LingotekHttp::getDefaultHeaders in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 4.0.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.0.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.1.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.2.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.3.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.4.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.5.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.6.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.7.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
- 3.8.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::getDefaultHeaders()
4 calls to LingotekHttp::getDefaultHeaders()
- LingotekHttp::delete in src/
Remote/ LingotekHttp.php - LingotekHttp::get in src/
Remote/ LingotekHttp.php - LingotekHttp::patch in src/
Remote/ LingotekHttp.php - LingotekHttp::post in src/
Remote/ LingotekHttp.php
File
- src/
Remote/ LingotekHttp.php, line 115
Class
Namespace
Drupal\lingotek\RemoteCode
protected function getDefaultHeaders() {
$headers = [
'Accept' => '*/*',
];
if ($token = $this->config
->get('account.access_token')) {
$headers['Authorization'] = 'bearer ' . $token;
}
return $headers;
}