protected function request($url)
	{
		$response = null;
		try {
			$response = $this->getHttpClient()
				->get($url)
				->send();
		} catch (ClientErrorResponseException $e) {
			return Json::encode([
				'error' => $e->getMessage()
			]);
		}

		return $response->json();
	}
protected function request($url)
	{
		$response = null;
		try {
			$response = $this->getHttpClient()
				->get($url)
				->send();
		} catch (ClientErrorResponseException $e) {
			return Json::encode([
				'error' => $e->getMessage()
			]);
		}

		return $response->json();
	}
protected function request ( $ url ) { $ response = null ; try { $ response = $ this -> getHttpClient ( ) -> get ( $ url ) -> send ( ) ; } catch ( ClientErrorResponseException $ e ) { return Json :: encode ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ response -> json ( ) ; }
Makes a request to packagist api
@param $url
@return array the parses json string
Makes a request to packagist api