/** * Validate request * * @throws AuthorizationException * @throws \Magento\Framework\Webapi\Exception * @return void */ protected function validateRequest() { $this->checkPermissions(); if ($this->getCurrentRoute()->isSecure() && !$this->_request->isSecure()) { throw new \Magento\Framework\Webapi\Exception(__('Operation allowed only in HTTPS')); } if ($this->storeManager->getStore()->getCode() === Store::ADMIN_CODE && strtoupper($this->_request->getMethod()) === RestRequest::HTTP_METHOD_GET) { throw new \Magento\Framework\Webapi\Exception(__('Cannot perform GET operation with store code \'all\'')); } }