/** * Get request body from client */ public function getRequestBody() { $request = new Request(); if ($request->getContentType() != 'application/json') { throw new \Exception("Wrong content type"); } return $request->getJsonRawBody(); }
/** * Get request body from client */ public function getRequestBody() { $request = new Request(); if ($request->getContentType() != 'application/json') { throw new \Exception("Wrong content type"); } return $request->getJsonRawBody(); }