Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * @param \Phalcon\Http\Request $request
  * @return array All request params (GET, POST, PUT, RawJsonBody)
  */
 public static function getMergeParams(Request $request)
 {
     $jsonRawBody = (array) $request->getJsonRawBody(true);
     $params = array_merge((array) $request->get(), (array) $request->getPost(), (array) $request->getPut(), $jsonRawBody);
     return self::convertDate($params, $request->getDI());
 }
Exemplo n.º 3
0
 public function getJsonRawBody($associative = true)
 {
     parent::getJsonRawBody($associative);
 }
Exemplo n.º 4
0
 public function getJsonRawBody($associative = false)
 {
     return parent::getJsonRawBody($associative);
 }
Exemplo n.º 5
0
 public function getJsonRawBody()
 {
     return parent::getJsonRawBody();
 }