<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def request_url(req=None):
 """ Get full url of a request """

    from uliweb import request

    r = req or request
    if request:
        if r.query_string:
            return r.path + '?' + r.query_string
        else:
            return r.path
    else:
        return ''