public function stream($url, array $query, callable $eventListener)
    {
        try {
            $response = $this->guzzleClient->request
            (
                'GET',
                $this->fullUrl($url),
                $this->getRequestOptions
                (
                    [
                        'stream' => true, 
                        'query' => $this->mergeQuery($url, $query),
                        'headers' =>
                            [
                                'Accept' => 'text/event-stream'
                            ]
                    ]
                )
            );
        } catch (RequestException $exception) {
            if ($exception->hasResponse()) {
                $response = $exception->getResponse();
            } else {
                return 500;
            }
        }

        if (strpos($response->getHeader('Content-Type')[0], 'text/event-stream') !== false) {
            $this->handleStreamBody($response->getBody(), $eventListener);
        } elseif ($this->isJsonResponse($response)) {
            $responseData = $this->decodeJson($response->getBody());
            $eventListener(['type' => '', 'id' => '', 'data' => $responseData]);
        }

        return $response->getStatusCode();
    }