public function getAction() { //$m = new RequestModel; $url = 'http://swoole.lo'; $http = new \Swoole\Client\Http($url); echo $http->get('/'); return false; }
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); } }