You can get the HTTP request’s root URI and resource URI with the request object’s getRootUri() and getResourceUri() methods:
//Get root URI
$rootUri = request()->getRootUri();
//Get resource URI
$resourceUri = request()->getResourceUri();
But there's none of these methods in the Request class.
@swimitup this is an oversight on the documentation end which was believed to have already been fixed. Thanks for pointing it out. You can refer to this issue #52
The documentation states:
https://leafphp.dev/modules/http/v/2/request.html#resource-uri
But there's none of these methods in the Request class.