<?php
namespace Bwip\ApiEndpoints\Model\Api;
use Magento\Framework\Exception\InputException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\App\RequestInterface;
use Bwip\ApiEndpoints\Api\CustomInterface;
class Custom implements CustomInterface
{
/**
* Returns greeting message to user
*
* @api
* @param string $name User name.
* @return string Greeting message with users name.
*/
protected $request;
public function __construct(
RequestInterface $request,
array $data = []
){
$this->request = $request;
}
public function info(){
$post= $this->request->getPost();
$info[] = array('message' => 'GET'POST Working.', 'status'=> 0);
return $info;
}
public function data(){
$post= $this->request->getPost();
$info[] = array('message' => 'POST'GET Working.', 'status'=> 0);
return $info;
}
}
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user