Controller/Rest.php
protected function processApiRequest()
    {
        $inputParams = $this->getInputParamsResolver()->resolve();

        $route = $this->getInputParamsResolver()->getRoute();
        $serviceMethodName = $route->getServiceMethod();
        $serviceClassName = $route->getServiceClass();

        $service = $this->_objectManager->get($serviceClassName);
        /** @var \Magento\Framework\Api\AbstractExtensibleObject $outputData */
        $outputData = call_user_func_array([$service, $serviceMethodName], $inputParams);
        $outputData = $this->serviceOutputProcessor->process(
            $outputData,
            $serviceClassName,
            $serviceMethodName
        );
        $filters = $this->getFilters();
        if ($filters && is_array($outputData)) {
            foreach ($filters as $filterClassName) {
                $outputData = $this->applyFilter($filterClassName, $outputData);
            }
        }
        $header = $this->getDeploymentConfig()->get(ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT);
        if ($header) {
            $this->_response->setHeader('X-Frame-Options', $header);
        }
        $this->_response->prepareResponse($outputData);
    }
protected function processApiRequest()
    {
        $inputParams = $this->getInputParamsResolver()->resolve();

        $route = $this->getInputParamsResolver()->getRoute();
        $serviceMethodName = $route->getServiceMethod();
        $serviceClassName = $route->getServiceClass();

        $service = $this->_objectManager->get($serviceClassName);
        /** @var \Magento\Framework\Api\AbstractExtensibleObject $outputData */
        $outputData = call_user_func_array([$service, $serviceMethodName], $inputParams);
        $outputData = $this->serviceOutputProcessor->process(
            $outputData,
            $serviceClassName,
            $serviceMethodName
        );
        $filters = $this->getFilters();
        if ($filters && is_array($outputData)) {
            foreach ($filters as $filterClassName) {
                $outputData = $this->applyFilter($filterClassName, $outputData);
            }
        }
        $header = $this->getDeploymentConfig()->get(ConfigOptionsListConstants::CONFIG_PATH_X_FRAME_OPT);
        if ($header) {
            $this->_response->setHeader('X-Frame-Options', $header);
        }
        $this->_response->prepareResponse($outputData);
    }
protected function processApiRequest ( ) { $ inputParams = $ this -> getInputParamsResolver ( ) -> resolve ( ) ; $ route = $ this -> getInputParamsResolver ( ) -> getRoute ( ) ; $ serviceMethodName = $ route -> getServiceMethod ( ) ; $ serviceClassName = $ route -> getServiceClass ( ) ; $ service = $ this -> _objectManager -> get ( $ serviceClassName ) ; /** @var \Magento\Framework\Api\AbstractExtensibleObject $outputData */ $ outputData = call_user_func_array ( [ $ service , $ serviceMethodName ] , $ inputParams ) ; $ outputData = $ this -> serviceOutputProcessor -> process ( $ outputData , $ serviceClassName , $ serviceMethodName ) ; $ filters = $ this -> getFilters ( ) ; if ( $ filters && is_array ( $ outputData ) ) { foreach ( $ filters as $ filterClassName ) { $ outputData = $ this -> applyFilter ( $ filterClassName , $ outputData ) ; } } $ header = $ this -> getDeploymentConfig ( ) -> get ( ConfigOptionsListConstants :: CONFIG_PATH_X_FRAME_OPT ) ; if ( $ header ) { $ this -> _response -> setHeader ( 'X-Frame-Options' , $ header ) ; } $ this -> _response -> prepareResponse ( $ outputData ) ; }
Execute API request

@return void
@throws AuthorizationException
@throws \Magento\Framework\Exception\InputException
@throws \Magento\Framework\Webapi\Exception
Execute API request