I want to send POST request from my magento 2 module to a Rest API with details like site URL. Example: if my site is http://thisisademostore.com. I should get this value inside my module.
Asked
Active
Viewed 67 times
1
-
Try this - $this->_storeManager->getStore()->getBaseUrl() and refer this - http://magento.stackexchange.com/questions/84980/how-to-get-magento2-base-url – Manthan Dave Mar 07 '17 at 10:43
-
you can use the same method like Magento 1 - $this->getUrl(); – Abhishek Panchal Mar 07 '17 at 16:06