示例#1
0
 public function getAction()
 {
     //$m = new RequestModel;
     $url = 'http://swoole.lo';
     $http = new \Swoole\Client\Http($url);
     echo $http->get('/');
     return false;
 }
示例#2
0
 protected function doPost($opt, $data)
 {
     $url = $this->base . '&opt=' . $opt;
     if ($this->client_type == 'curl') {
         return $this->http->post($url, $data);
     } else {
         return Swoole\Client\Http::quickPost($url, $data);
     }
 }