protected function createClientRequest(RequestInterface $request): PsrRequestInterface
    {
        $endpoint = $this->endpointService->getEndpointForRequest($request);

        return new Request(
            'POST',
            $endpoint->getRequestPath(),
            $this->getRequestHeaders($endpoint),
            $this->serializer->serialize($request, 'json')
        );
    }