You are here

public function LingotekHttp::patch in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 8 src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  2. 4.0.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  3. 3.0.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  4. 3.1.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  5. 3.2.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  6. 3.3.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  7. 3.4.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  8. 3.5.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  9. 3.6.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  10. 3.7.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()
  11. 3.8.x src/Remote/LingotekHttp.php \Drupal\lingotek\Remote\LingotekHttp::patch()

Send a PATCH request.

Overrides LingotekHttpInterface::patch

File

src/Remote/LingotekHttp.php, line 100

Class

LingotekHttp
Lingotek HTTP implementation using Guzzle.

Namespace

Drupal\lingotek\Remote

Code

public function patch($path, $args = [], $use_multipart = FALSE) {
  return $this->httpClient
    ->patch($this
    ->getBaseUrl() . $path, [
    RequestOptions::FORM_PARAMS => $args,
    RequestOptions::HEADERS => $this
      ->getDefaultHeaders() + [
      'X-HTTP-Method-Override' => 'PATCH',
    ],
  ]);
}