public function LingotekHttp::get in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 4.0.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.0.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.1.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.2.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.3.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.4.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.5.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.6.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.7.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
- 3.8.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::get()
Overrides LingotekHttpInterface::get
File
- src/
Remote/ LingotekHttp.php, line 46
Class
Namespace
Drupal\lingotek\RemoteCode
public function get($path, $args = array()) {
$options = [];
if (count($args)) {
$options = [
RequestOptions::QUERY => $args,
];
}
return $this->httpClient
->get($this
->getBaseUrl() . $path, [
RequestOptions::HEADERS => $this
->getDefaultHeaders(),
] + $options);
}