title: Getting protocol from the URL in controller
body: <p>I Googled it but maybe my search keywords are useless so how can I get URL protocol in controller? IS it http:// or https://</p>
  
  <pre><code>http://whatever.com/app_dev.php/welcome
  
  //I need to echo http:// protocol here
  echo $request-&gt;getHost(); //echos whatever.com
  echo $request-&gt;getBaseUrl(); //echos app_dev.php/
  </code></pre>