master
ELF 5 years ago
parent 1a010cee03
commit 9abf8af912

@ -2908,7 +2908,7 @@ function post_task($url, $data) {
$promise = $client->requestAsync('POST', $url, [ $promise = $client->requestAsync('POST', $url, [
'form_params' => $data 'form_params' => $data
]); ]);
$promise->then( /* $promise->then(
function (ResponseInterface $res) { function (ResponseInterface $res) {
echo $res->getStatusCode() . PHP_EOL; echo $res->getStatusCode() . PHP_EOL;
}, },
@ -2916,6 +2916,6 @@ function post_task($url, $data) {
echo $e->getMessage() . PHP_EOL; echo $e->getMessage() . PHP_EOL;
echo $e->getRequest()->getMethod(); echo $e->getRequest()->getMethod();
} }
); ); */
$promise->wait(); $promise->wait();
} }

Loading…
Cancel
Save