Move isJSONContentType to content-type parser

Previously this function was based on a basic string comparison.  This
is fine, but found several inconsistencies, like not handling spaces in
the appropriate places.

This commit creates a new function getContentType, using the new parsing
infrastructure.  As doing this, it showed that the existing parser
functions were not handling case insensitive compares for the mime type.
While this is technically not required, it's something we unit test for,
and relatively easy to add.

Note, that because this parser ignores charset, this moves charset=ascii
from something that previously failed, to something that now succeeds.
This is expected.

Tested: Unit tests pass.  Good coverage

Change-Id: I825a72862135b62112ee504ab0d9ead9d6796354
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/http/parsing.hpp b/http/parsing.hpp
index d596211..b39537c 100644
--- a/http/parsing.hpp
+++ b/http/parsing.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include "http/http_request.hpp"
+#include "http_utility.hpp"
 #include "logging.hpp"
 #include "str_utility.hpp"
 
@@ -19,10 +20,8 @@
 
 inline bool isJsonContentType(std::string_view contentType)
 {
-    return bmcweb::asciiIEquals(contentType, "application/json") ||
-           bmcweb::asciiIEquals(contentType,
-                                "application/json; charset=utf-8") ||
-           bmcweb::asciiIEquals(contentType, "application/json;charset=utf-8");
+    return http_helpers::getContentType(contentType) ==
+           http_helpers::ContentType::JSON;
 }
 
 inline JsonParseResult parseRequestAsJson(const crow::Request& req,