Move http client to URL

Type safety is a good thing.  In:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65606

It was found that splitting out the URI into encoded pieces in the early
phase removed some information we needed, namely whether or not a URI
was ipv6.  This commit changes http client such that it passes all the
information through, with the correct type, rather than passing in
hostname, port, path, and ssl separately.

Opportunistically, because a number of log lines are changing, this uses
the opportunity to remove a number of calls to std::to_string, and rely
on std::format instead.

Now that we no longer use custom URI splitting code, the
ValidateAndSplitUrl() method can be removed, given that our validation
now happens in the URI class.

Tested: Aggregation works properly when satellite URIs are queried.

Change-Id: I9f605863179af54c5af2719bc5ce9d29cbfffab7
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/include/event_service_store.hpp b/include/event_service_store.hpp
index 61f1ac7..8b24fcb 100644
--- a/include/event_service_store.hpp
+++ b/include/event_service_store.hpp
@@ -3,6 +3,7 @@
 
 #include <boost/beast/http/fields.hpp>
 #include <boost/container/flat_map.hpp>
+#include <boost/url/parse.hpp>
 #include <nlohmann/json.hpp>
 
 namespace persistent_data
@@ -11,7 +12,7 @@
 struct UserSubscription
 {
     std::string id;
-    std::string destinationUrl;
+    boost::urls::url destinationUrl;
     std::string protocol;
     std::string retryPolicy;
     std::string customText;
@@ -48,7 +49,13 @@
                 {
                     continue;
                 }
-                subvalue->destinationUrl = *value;
+                boost::urls::result<boost::urls::url> url =
+                    boost::urls::parse_absolute_uri(*value);
+                if (!url)
+                {
+                    continue;
+                }
+                subvalue->destinationUrl = std::move(*url);
             }
             else if (element.key() == "Protocol")
             {