lib/PatrolModel.php
protected function _post($url, $data = [], $class = null) {
        $client = new HttpClient($this->patrol, 'post', $url, $data);

        $data = $client->response();

        if (isset($data['error'])) {
            $this->_error($data);
        }

        if (!isset($data['data'])) {
            return $data;
        }

        $data = $data['data'];

        $callee = $class ? $class : get_called_class();
        return Util::parseResponseToPatrolObject($this->patrol, $data, $callee, $this->defaults);
    }
protected function _post($url, $data = [], $class = null) {
        $client = new HttpClient($this->patrol, 'post', $url, $data);

        $data = $client->response();

        if (isset($data['error'])) {
            $this->_error($data);
        }

        if (!isset($data['data'])) {
            return $data;
        }

        $data = $data['data'];

        $callee = $class ? $class : get_called_class();
        return Util::parseResponseToPatrolObject($this->patrol, $data, $callee, $this->defaults);
    }
protected function _post ( $ url , $ data = [ ] , $ class = null ) { $ client = new HttpClient ( $ this -> patrol , 'post' , $ url , $ data ) ; $ data = $ client -> response ( ) ; if ( isset ( $ data [ 'error' ] ) ) { $ this -> _error ( $ data ) ; } if ( ! isset ( $ data [ 'data' ] ) ) { return $ data ; } $ data = $ data [ 'data' ] ; $ callee = $ class ? $ class : get_called_class ( ) ; return Util :: parseResponseToPatrolObject ( $ this -> patrol , $ data , $ callee , $ this -> defaults ) ; }
Perform a POST request based on this model

@param string $url
@param array $data
@param string $class The class type where the result should be casted to

@return PatrolSdk\Model
Perform a POST request based on this model