Код: Выделить всё
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
$client= new Client();
$url="https://test.com?imei=123456789";
$request= new Request("GET", $url);
$promise = $client->sendAsync($request)->detach();
$promise->then(function ($response) {
echo 'I completed! ' . $response->getBody();
});
//$promise->wait();
echo "Continuing with other code...\n";
die;
Код: Выделить всё
{
"name": "findy/findy",
"description": "A brief description of your project",
"require": {
"guzzlehttp/guzzle": "^7.8"
},
"autoload": {
"psr-4": {
"GuzzleHttp\\": "vendor/guzzlehttp/guzzle/src/"
}
},
"minimum-stability": "stable"
}
Неустранимая ошибка: неперехваченная ошибка: вызов неопределенного метода GuzzleHttp\Promise\Promise::detach( )
Пожалуйста, помогите мне
Подробнее здесь: https://stackoverflow.com/questions/784 ... us-request