You are here

public function ImportService::jsonApiRequest in Entity Share 8.3

Performs a HTTP request on a JSON:API endpoint.

Pass the request to the injected remote manager using RuntimeImportContext data.

Parameters

string $method: HTTP method.

string $url: URL to request.

Return value

\Psr\Http\Message\ResponseInterface The response.

Overrides ImportServiceInterface::jsonApiRequest

See also

\GuzzleHttp\ClientInterface::request()

1 call to ImportService::jsonApiRequest()
ImportService::importFromUrl in modules/entity_share_client/src/Service/ImportService.php
Import the entities from a prepared JSON:API URL.

File

modules/entity_share_client/src/Service/ImportService.php, line 392

Class

ImportService
Class ImportService.

Namespace

Drupal\entity_share_client\Service

Code

public function jsonApiRequest($method, $url) {
  return $this->remoteManager
    ->jsonApiRequest($this->runtimeImportContext
    ->getRemote(), $method, $url);
}