How to programmatically build a store's URL with the forced HTTPS protocol using the «_secure» parameter?

Examples

1. \Magento\Authorizenet\Helper\Data::_getUrl()

2. Magento_Authorizenet::directpost/info.phtml

3. \Magento\Braintree\Block\Paypal\Button::getActionSuccess()

4. \Magento\Braintree\Controller\Paypal\PlaceOrder::execute()

5. \Magento\Braintree\Controller\Paypal\Review::execute()

6. \Magento\Braintree\Controller\Paypal\SaveShippingMethod::execute()

7. \Magento\Braintree\Model\Ui\TokenUiComponentProvider::getNonceRetrieveUrl()

8. \Magento\Braintree\Model\Ui\Adminhtml\TokenUiComponentProvider::getNonceRetrieveUrl()

9. \Magento\Captcha\Block\Adminhtml\Captcha\DefaultCaptcha::getRefreshUrl()

10. \Magento\Captcha\Block\Captcha\DefaultCaptcha::getRefreshUrl()

11. \Magento\Captcha\Model\Checkout\ConfigProvider::getRefreshUrl()

12. \Magento\Catalog\Block\Adminhtml\Rss\NotifyStock::getRssData()

13. \Magento\Catalog\Helper\Product\Compare::getAddToCartUrl()

14. \Magento\Checkout\Block\Cart::getCheckoutUrl()

See also: