You are here

interface LingotekHttpInterface in Lingotek Translation 4.0.x

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

Lingotek HTTP interface.

Hierarchy

Expanded class hierarchy of LingotekHttpInterface

All classes that implement LingotekHttpInterface

1 file declares its use of LingotekHttpInterface
LingotekApiUnitTest.php in tests/src/Unit/Remote/LingotekApiUnitTest.php

File

src/Remote/LingotekHttpInterface.php, line 10

Namespace

Drupal\lingotek\Remote
View source
interface LingotekHttpInterface extends ContainerInjectionInterface {

  /**
   * Send a GET request.
   *
   * @param string|\Psr\Http\Message\UriInterface $path
   *   URI object or string.
   * @param array $args
   *   Request argument to add via query string.
   *
   * @return \Psr\Http\Message\ResponseInterface
   *   A response.
   */
  public function get($path, $args = []);

  /**
   * Send a POST request.
   *
   * @param string|\Psr\Http\Message\UriInterface $path
   *   URI object or string.
   * @param array $args
   *   Request arguments to the POST request.
   * @param bool $use_multipart
   *   If TRUE, use multipart post arguments. If FALSE, uses form parameters.
   *
   * @return \Psr\Http\Message\ResponseInterface
   *   A response.
   */
  public function post($path, $args = [], $use_multipart = FALSE);

  /**
   * Send a DELETE request.
   *
   * @param string|\Psr\Http\Message\UriInterface $path
   *   URI object or string.
   * @param array $args
   *   Request argument to add via query string.
   *
   * @return \Psr\Http\Message\ResponseInterface
   *   A response.
   */
  public function delete($path, $args = []);

  /**
   * Send a PATCH request.
   *
   * @param string|\Psr\Http\Message\UriInterface $path
   *   URI object or string.
   * @param array $args
   *   Request arguments to the PATCH request.
   * @param bool $use_multipart
   *   If TRUE, use multipart post arguments. If FALSE, uses form parameters.
   *
   * @return \Psr\Http\Message\ResponseInterface
   *   A response.
   */
  public function patch($path, $args = [], $use_multipart = FALSE);

  /**
   * Gets the current configured token.
   *
   * @return string
   *   The token.
   */
  public function getCurrentToken();

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerInjectionInterface::create public static function Instantiates a new instance of this class. 75
LingotekHttpInterface::delete public function Send a DELETE request. 1
LingotekHttpInterface::get public function Send a GET request. 1
LingotekHttpInterface::getCurrentToken public function Gets the current configured token. 1
LingotekHttpInterface::patch public function Send a PATCH request. 1
LingotekHttpInterface::post public function Send a POST request. 1