code: public static boolean isJsonRequest(HttpServerExchange exchange) {
          Objects.requireNonNull(exchange, Required.HTTP_SERVER_EXCHANGE.toString());
  
          final HeaderMap headerMap = exchange.getRequestHeaders();
          return headerMap != null && headerMap.get(Header.CONTENT_TYPE.toHttpString()) != null &&
                  headerMap.get(Header.CONTENT_TYPE.toHttpString()).element().toLowerCase(Locale.ENGLISH).contains(MediaType.JSON_UTF_8.withoutParameters().toString());
      }
docs: Checks if the requests content-type contains application/json
  
  @param exchange The Undertow HttpServerExchange
  @return True if the request content-type contains application/json, false otherwise