Magento2: How to check if request is from Web Service?
I used Magento\Framework\App\State::getAreaCode()
to find if request is coming via SOAP / REST API.
You can check the possible area codes in Magento\Framework\App\Area
class.
I used Magento\Framework\App\State::getAreaCode()
to find if request is coming via SOAP / REST API.
You can check the possible area codes in Magento\Framework\App\Area
class.