MAGENTO 2: Get REST API Request Params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**
* \Magento\Framework\Webapi\Rest\Request
*/
protected $request;
/**
* Constructor
* \Magento\Framework\Webapi\Rest\Request $request
*
*/
public function __construct(
\Magento\Framework\Webapi\Rest\Request $request
) {
$this->request = $request;
}
/**
* @author Reena Parekh <reena1.parekh@gmail.com>
*
* @return $this
*/
protected function myCustomFunction()
{
$params = $this->request->getParams();
return $this;
}
Comments
Post a Comment