Amp\Artax\Client::processAggregateBody PHP Method

processAggregateBody() private method

private processAggregateBody ( RequestCycle $cycle, Amp\Artax\AggregateBody $body )
$cycle RequestCycle
$body Amp\Artax\AggregateBody
    private function processAggregateBody(RequestCycle $cycle, AggregateBody $body)
    {
        $promise = $body->getBody();
        $promise->when(function ($error, $result) use($cycle, $body) {
            if ($error) {
                $this->fail($cycle, $error);
            } else {
                $cycle->request->setBody($result);
                $this->processAggregateBodyHeaders($cycle, $body);
            }
        });
    }