public function createRequestFromSuperglobals(array $server): IHttpRequestMessage
    {
        $method = $server['REQUEST_METHOD'] ?? 'GET';

        // Permit the overriding of the request method for POST requests
        if ($method === 'POST' && isset($server['X-HTTP-METHOD-OVERRIDE'])) {
            $method = $server['X-HTTP-METHOD-OVERRIDE'];
        }

        $uri = $this->createUriFromSuperglobals($server);
        $headers = $this->createHeadersFromSuperglobals($server);
        $body = new StreamBody(new Stream(fopen('php://input', 'rb')));
        $properties = $this->createProperties($server);

        return new Request($method, $uri, $headers, $body, $properties);
    }