예제 #1
0
 protected function yieldAsyncPromisesForPostRequests(int $batchSize) : \Generator
 {
     foreach ($this->createRequests($batchSize) as $key => $request) {
         (yield $key => $this->guzzleClient->postAsync($this->apiUrl, ['headers' => ['Content-Type' => 'application/json'], 'body' => json_encode($request)]));
     }
 }