Get the https or http protocol depending on SSL support.
Call this only if you know that the server supports both.
string The correct type of protocol
protected function getScheme() : string { if (extension_loaded('openssl')) { return 'https'; } return 'http'; }