msgraph-sdk-php
msgraph-sdk-php copied to clipboard
requests are not asynchronous
It seesm the requests aren't really asynchronous as stated in the readme ("The SDK is designed to make async requests by default").
$t = microtime(true);
$r = $graphServiceClient->users()->byUserId($user_id)->get();
print_r($r); // => fullfilled promise, already contains data
var_dump(number_format(microtime(true) - $t, 3)); // about 400ms later
Is this a bug or could this be environment related?
I realized when doing mutliple the actual requests seem async, it's just the output that is still in sync for some reason
Yeah, I noticed the same when I tried to download the files asynchronously. I created a ticket in a corresponding repo: https://github.com/microsoft/kiota-php/issues/32