title: Play Framework 2.1: Scala: how to get the whole base url (including protocol)?
body: <p>Currently I am able to get the host from the <a href="http://www.playframework.com/documentation/api/2.1.0/scala/index.html#play.api.mvc.Request">request</a>, which includes domain and optional port. Unfortunately, it does not include the protocol (http vs https), so I cannot create absolute urls to the site itself.</p>
  
  <pre><code>object Application extends Controller {
    def index = Action { request =&gt;
      Ok(request.host + "/some/path") // Returns "localhost:9000/some/path"
    }
  }
  </code></pre>
  
  <p>Is there any way to get the protocol from the request object?</p>