getVersion() public method

public getVersion ( )
 /**
  *
  */
 protected function handleResponse($request)
 {
     $this->progress->onResponse($this->httpResponse);
     $this->createStream($request);
     $response = new Response($this->httpResponse->getCode(), $this->httpResponse->getHeaders(), $this->stream, $this->httpResponse->getVersion(), $this->httpResponse->getReasonPhrase());
     if (!$this->options['stream']) {
         return $request->on('end', function () use($response) {
             $this->resolveResponse($response);
         });
     }
     $this->resolveResponse($response);
 }
Example #2
0
 /**
  * Transform a React Response to a valid PSR7 ResponseInterface instance.
  *
  * @param ReactResponse   $response
  * @param StreamInterface $body
  *
  * @return ResponseInterface
  */
 private function buildResponse(ReactResponse $response, StreamInterface $body)
 {
     $body->rewind();
     return $this->responseFactory->createResponse($response->getCode(), $response->getReasonPhrase(), $response->getHeaders(), $body, $response->getVersion());
 }