protected function createBodyRequest(
        string $method,
        $uri,
        array $parameters = [],
        ?ContentType $contentType = null,
        array $headers = [],
        string $protocol = '1.1'
    ): RequestInterface {
        if ($contentType === null) {
            $contentType = ContentType::fromValue(ContentType::FORM);
        }

        $body = null;
        if (!empty($parameters)) {
            switch ($contentType->value()) {
                case ContentType::FORM:
                    $body = http_build_query($parameters);
                    break;
                case ContentType::JSON:
                    $body = json_encode($parameters);
                    break;
                default:
                    break;
            }
        }

        if ($body !== null) {
            $headers = array_merge(['Content-Type' => $contentType->value()], $headers);
        }

        $uri = $this->createUri($uri);
        $body = $this->createStream($body);

        return $this->createRequest($method, $uri, $headers, $body, $protocol);
    }