php - how to post Guzzle 6 Async data -
i trying post data async using guzzle 6(latest ver)
$client = new client(); $request = $client->postasync($url, [ 'json' => [ 'company_name' => 'update name' ], ]);
but not getting request form guzzle post request on terminal
have tried send request?
http://guzzle.readthedocs.org/en/latest/index.html?highlight=async
$client = new client(); $request = new request('post', $url, [ "json" => [ 'company_name' => 'update name'] ]); $promise = $client->sendasync($request)->then(function ($response) { echo 'i completed! ' . $response->getbody(); }); $promise->wait();
Comments
Post a Comment