//小技巧:
//1. 在系统中可以直接用工具类base_httpclient 来实现.
//2. openapi的调用api可以用kernel::openapi_url()生成.

$http
= new base_httpclient; $url = kernel::openapi_url('openapi.queue','worker',array('task_id'=>$task_id)); $http->post($url,$_POST);
 
//base_httpclient下面含有curl的方法
function get($url,$headers=null,$callback=null,$ping_only=false){ return $this->netcore->action(__FUNCTION__,$url,$headers,$callback,null,$ping_only); } function post($url,$data,$headers=null,$callback=null,$ping_only=false){ return $this->netcore->action(__FUNCTION__,$url,$headers,$callback,$data,$ping_only); }

 

posted on 2017-10-20 17:08  limonyun  阅读(213)  评论(0编辑  收藏  举报