|
|
@ -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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|