public function createRequest(string $method,
                                  $uri,
                                  array $headers = [],
                                  $body = null,
                                  $protocolVersion = '1.1'): RequestInterface
    {
        $request = new Request($method, $this->createUri($uri));

        // Headers ?
        if (!empty($headers)) {
            $request = $request->withHeaders($headers);
        }

        // Body ?
        if (!is_null($body)) {
            if ($body instanceof StreamInterface) {
                $request = $request->withBody($body);
            }

            if (is_resource($body)) {
                $request = $request->withBody($this->createStreamFromResource($body));
            }

            if (is_string($body)) {
                $request = $request->withBody($this->createStream($body));
            }
        }

        // Protocol version ?
        if ($protocolVersion != $request->getProtocolVersion()) {
            $request = $request->withProtocolVersion($protocolVersion);
        }

        return $request;
    }