MultiHttp icon indicating copy to clipboard operation
MultiHttp copied to clipboard

能做异常的回调?

Open sunsky opened this issue 8 years ago • 1 comments

当然 ,没问题, e.g.:

比如: Request::create()->post(
          'http://127.0.0.1')->setLogHandler(callable $handler));

sunsky avatar Dec 14 '17 02:12 sunsky

异步编程:

$result = Request::create()->post(
          'http://127.0.0.1',
         array('data'=>'this_is_post_data'), array(
          'callback' => function (Response $response) {
              echo $response->body;
          }))->send();

sunsky avatar Dec 14 '17 02:12 sunsky