Exemple #1
0
 function call($param, $post = null)
 {
     foreach ($param as &$m) {
         if (is_array($m) or is_object($m)) {
             $m = serialize($m);
         }
     }
     $url = $this->server_url . Swoole_tools::combine_query($param);
     if ($post === null) {
         $res = $this->http->get($url);
     } else {
         $res = $this->http->post($url, $post);
     }
     if ($this->debug) {
         echo $url, BL, $res;
     }
     return json_decode($res);
 }