src/RestClient.php
public function post(string $path, array $data, array $parameters = [])
    {
        $parameters['json'] = $data;
        try {
            return $this->executeRequest(
                'POST',
                $this->baseUrl . $path,
                $parameters
            );
        } catch (ClientException $e) {
            throw new RestClientException(
                'Cannot create resource',
                $path,
                [],
                3,
                $e
            );
        } catch (TransferException $e) {
            throw new RestException(
                'Error while posting resource',
                $path,
                [],
                4,
                $e
            );
        }
    }
public function post(string $path, array $data, array $parameters = [])
    {
        $parameters['json'] = $data;
        try {
            return $this->executeRequest(
                'POST',
                $this->baseUrl . $path,
                $parameters
            );
        } catch (ClientException $e) {
            throw new RestClientException(
                'Cannot create resource',
                $path,
                [],
                3,
                $e
            );
        } catch (TransferException $e) {
            throw new RestException(
                'Error while posting resource',
                $path,
                [],
                4,
                $e
            );
        }
    }
@return array|ResponseInterface

@throws RestClientException
@throws RestException