if (isMappingIndexRequest(request)) {
// lets return the JSON of all the results
String json = mappingRulesToJson(mappingRules);
HttpServerResponse response = request.response();
response.headers().set("ContentType", "application/json");
response.end(json);
response.setStatusCode(200);
} else {
MappedServices mappedServices = null;
URL clientURL = null;
Set<Map.Entry<String, MappedServices>> entries = mappingRules.entrySet();