$url property is an instance of a Url object.
Each Url object has these properties:
The property values are derived from applying
parse_url() to the various Request
$server['HTTPS'] === 'on', the scheme is 'https'; otherwise, it is
$server['HTTP_HOST'] is present, it is used as the host name; otherwise,
$server['SERVER_NAME'] is used.
If a port number is present on the host name, it is used as the port;
$server['SERVER_PORT'] is used.
$server['REQUEST_URI'] is used for the path and query string.
If the parsing attempt fails, all Url properties will be null.
The Url is stringable, and will return the full URL string:
$url = (string) $request->url; // https://example.com/path/etc