Well, I suppose because there may not be one—you can access the S object outside of an HTTP request/response cycle. One could as well ask why uri
doesn't return a Box/Option. If you look at the code it handles the Empty/None case with a default of "/" in just those cases. I suspect this is very old code in Lift so there may not be a consistent rationalization.
Oh, if you look at the comments for this code, it suggests a way to get the raw URI + query string (I believe Lift omits the application context):
* If you want the full URI, including the context path, you should retrieve it
* from the underlying HTTPRequest. You could do something like:
*
* <pre name="code" class="scala" >
* val fullURI = S.request.map(_.request.getRequestURI) openOr ("Undefined")
* </pre>