You are here

public function Client::__construct in Little helpers 7.2

Same name and namespace in other branches
  1. 7 src/Rest/Client.php \Drupal\little_helpers\Rest\Client::__construct()

Constructor.

Parameters

string $endpoint: The base-URL for this API.

array $options: Default options for all requests ie. credentials for Basic Auth.

File

src/Rest/Client.php, line 21

Class

Client
This a simple JSON REST Client based on drupal_http_request().

Namespace

Drupal\little_helpers\Rest

Code

public function __construct($endpoint, array $options = []) {
  $this->endpoint = $endpoint;
  $this->options = $options;
}