MultiHttp
MultiHttp copied to clipboard
能做异常的回调?
当然 ,没问题, e.g.:
比如: Request::create()->post(
'http://127.0.0.1')->setLogHandler(callable $handler));
异步编程:
$result = Request::create()->post(
'http://127.0.0.1',
array('data'=>'this_is_post_data'), array(
'callback' => function (Response $response) {
echo $response->body;
}))->send();