phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libevent=/usr/local/libevent/ --enable-ahttp
branch for_php55 for php5.5
branch master for php7
$obj = new ahttp();
$obj->set_time_out(1000);
$obj->get('http://www.google.com');
$obj->post('http://example.com', array('data' => 'aaaaaa'));
$obj->get('http://example.com', array('header' => array('User-agent' => 'ahttp')));
$obj->wait_reply();
$arr = $obj->result();
返回值的顺序按发起的返回