public function RequestServiceInterface::request in Entity Share 8.2
Performs a HTTP request. Wraps the Guzzle HTTP client.
Why wrap the Guzzle HTTP client? Because we want to be able to override this service during tests to emulate another website.
Parameters
\GuzzleHttp\Client $http_client: The HTTP client.
string $method: HTTP method.
string $url: URL to request.
Return value
\Psr\Http\Message\ResponseInterface The response.
See also
\GuzzleHttp\ClientInterface::request()
1 method overrides RequestServiceInterface::request()
- RequestService::request in modules/
entity_share_client/ src/ Service/ RequestService.php - Performs a HTTP request. Wraps the Guzzle HTTP client.
File
- modules/
entity_share_client/ src/ Service/ RequestServiceInterface.php, line 32
Class
- RequestServiceInterface
- Request service interface methods.
Namespace
Drupal\entity_share_client\ServiceCode
public function request(Client $http_client, $method, $url);