You are here

HttpClientInterface.php in HTTP Client Manager 8

Same filename and directory in other branches
  1. 8.2 src/HttpClientInterface.php

File

src/HttpClientInterface.php
View source
<?php

namespace Drupal\http_client_manager;


/**
 * Interface HttpClientInterface
 *
 * @package Drupal\http_client_manager
 */
interface HttpClientInterface {

  /**
   * Header name definition for Service Api.
   */
  const HEADER_API = 'X-HTTPCM-API';

  /**
   * Header name definition for Command name.
   */
  const HEADER_COMMAND = 'X-HTTPCM-COMMAND';

  /**
   * Get Http Service Api data.
   *
   * @return array
   *   An array containing service api data.
   */
  public function getApi();

  /**
   * Get service api commands.
   *
   * @return mixed
   */
  public function getCommands();

  /**
   * Get single service api command by name.
   *
   * @param string $commandName
   *   The command name.
   *
   * @return mixed
   */
  public function getCommand($commandName);

  /**
   * Execute command call.
   *
   * @param string $commandName
   *  The Guzzle command name.
   * @param array $params
   *  The Guzzle command parameters array.
   *
   * @return \Guzzle\Service\Resource\Model|array
   *   The Guzzle Command execution result.
   */
  public function call($commandName, array $params = []);

}

Interfaces

Namesort descending Description
HttpClientInterface Interface HttpClientInterface