in iep-admin/src/main/java/com/netflix/iep/admin/RequestHandler.java [75:90]
private void handleImpl(HttpExchange exchange, Object obj) throws IOException {
addCorsHeaders(exchange);
switch (exchange.getRequestMethod()) {
case "OPTIONS":
exchange.sendResponseHeaders(200, -1L);
break;
case "GET":
case "HEAD":
sendResponse(exchange, obj);
break;
default:
// Return method not allowed error for all other method types
sendResponse(exchange, new ErrorMessage(405, "only OPTIONS, GET, and HEAD are supported"));
break;
}
}