Q:

how to post Guzzle 6 Async data

i trying to post data as Async with using Guzzle 6(latest ver)
    $client = new Client();
    $request = $client->postAsync($url, [
        'json' => [
                'company_name' => 'update Name'
        ],
    ]);

but i am not getting any request form Guzzle like post request on terminal

A:

Have you tried to send the 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();

