public function pool(
        string $service,
        string $route,
        array $path = [],
        array $query = [],
        array $headers = []
    ) {
        $request = $this->requestStack->getCurrentRequest();
        $headers = array_merge(null === $request ? [] : $request->headers->all(), $headers);

        $promise = $this->request($service)->getProducer()->getPromise(
            $this->requestService->create(
                ($route != 'root') ? $this->convertToPath($route) : '/',
                $path,
                $query,
                $headers,
                $this->method
            )
        );
        $this->queryPoolService->add($service, $promise);

        return $this;
    }
public function pool(
        string $service,
        string $route,
        array $path = [],
        array $query = [],
        array $headers = []
    ) {
        $request = $this->requestStack->getCurrentRequest();
        $headers = array_merge(null === $request ? [] : $request->headers->all(), $headers);

        $promise = $this->request($service)->getProducer()->getPromise(
            $this->requestService->create(
                ($route != 'root') ? $this->convertToPath($route) : '/',
                $path,
                $query,
                $headers,
                $this->method
            )
        );
        $this->queryPoolService->add($service, $promise);

        return $this;
    }
public function pool ( string $ service , string $ route , array $ path = [ ] , array $ query = [ ] , array $ headers = [ ] ) { $ request = $ this -> requestStack -> getCurrentRequest ( ) ; $ headers = array_merge ( null === $ request ? [ ] : $ request -> headers -> all ( ) , $ headers ) ; $ promise = $ this -> request ( $ service ) -> getProducer ( ) -> getPromise ( $ this -> requestService -> create ( ( $ route != 'root' ) ? $ this -> convertToPath ( $ route ) : '/' , $ path , $ query , $ headers , $ this -> method ) ) ; $ this -> queryPoolService -> add ( $ service , $ promise ) ; return $ this ; }
Add requests to query pool data

@param string $service
@param string $route
@param array  $path
@param array  $query
@param array  $headers

@return CommunicatorService
@throws \ReflectionException
Add requests to query pool data