Added the $protocol flag to getRequestUrl

It allows you to optionally skip the protocol in the URL.