MAGENTO 2: Get REST API Request Params


/**
* \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;
}
view raw RestParams.php hosted with ❤ by GitHub


Comments

Popular posts from this blog

SEO for your Press Releases [Updated 2025 list]

XDebug - PHPStorm - Mac: How to configure Xdebug with PHPStorm on Mac OS and PHP 7.3