getBody() 공개 메소드

The resolved promise value may be a string or an Iterator. An event reactor is always passed to assist with asynchronous value resolution.
public getBody ( ) : Amp\Promise
리턴 Amp\Promise
예제 #1
0
 private function processAggregateBody(RequestCycle $cycle, AggregateBody $body)
 {
     $promise = $body->getBody($this->reactor);
     $promise->when(function ($error, $result) use($cycle, $body) {
         if ($error) {
             $this->fail($cycle, $error);
         } else {
             $cycle->request->setBody($result);
             $this->processAggregateBodyHeaders($cycle, $body);
         }
     });
 }