apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigFileController.java/ConfigFileController/loadConfig
class ConfigFileController:  private String loadConfig(ConfigFileOutputFormat outputFormat, String appId, String clusterName,
                            String namespace, String dataCenter, String clientIp, String clientLabel,
                            HttpServletRequest request,
                            HttpServletResponse response) throws IOException {
    ApolloConfig apolloConfig = configController.queryConfig(appId, clusterName, namespace,
        dataCenter, "-1", clientIp, clientLabel, null, request, response);

    if (apolloConfig == null || apolloConfig.getConfigurations() == null) {
      return null;
    }

    String result = null;

    switch (outputFormat) {
      case PROPERTIES:
        Properties properties = new Properties();
        properties.putAll(apolloConfig.getConfigurations());
        result = PropertiesUtil.toString(properties);
        break;
      case JSON:
        result = GSON.toJson(apolloConfig.getConfigurations());
        break;
    }

    return result;
  }