diff --git a/http/ut/utility_test.cpp b/http/ut/utility_test.cpp
index 2f19fca..88743e0 100644
--- a/http/ut/utility_test.cpp
+++ b/http/ut/utility_test.cpp
@@ -127,6 +127,61 @@
     EXPECT_EQ(std::string_view(url.data(), url.size()), "/%2f/bad&tring");
 }
 
+TEST(Utility, readUrlSegments)
+{
+    using crow::utility::readUrlSegments;
+
+    boost::urls::result<boost::urls::url_view> parsed =
+        boost::urls::parse_relative_ref("/redfish/v1/Chassis#/Fans/0/Reading");
+
+    EXPECT_TRUE(readUrlSegments(*parsed, "redfish", "v1", "Chassis"));
+
+    EXPECT_FALSE(readUrlSegments(*parsed, "FOOBAR", "v1", "Chassis"));
+
+    EXPECT_FALSE(readUrlSegments(*parsed, "redfish", "v1"));
+
+    EXPECT_FALSE(
+        readUrlSegments(*parsed, "redfish", "v1", "Chassis", "FOOBAR"));
+
+    std::string out1;
+    std::string out2;
+    std::string out3;
+    EXPECT_TRUE(readUrlSegments(*parsed, "redfish", "v1", std::ref(out1)));
+    EXPECT_EQ(out1, "Chassis");
+
+    out1 = out2 = out3 = "";
+    EXPECT_TRUE(readUrlSegments(*parsed, std::ref(out1), std::ref(out2),
+                                std::ref(out3)));
+    EXPECT_EQ(out1, "redfish");
+    EXPECT_EQ(out2, "v1");
+    EXPECT_EQ(out3, "Chassis");
+
+    out1 = out2 = out3 = "";
+    EXPECT_TRUE(readUrlSegments(*parsed, "redfish", std::ref(out1), "Chassis"));
+    EXPECT_EQ(out1, "v1");
+
+    out1 = out2 = out3 = "";
+    EXPECT_TRUE(readUrlSegments(*parsed, std::ref(out1), "v1", std::ref(out2)));
+    EXPECT_EQ(out1, "redfish");
+    EXPECT_EQ(out2, "Chassis");
+
+    EXPECT_FALSE(readUrlSegments(*parsed, "too", "short"));
+
+    EXPECT_FALSE(readUrlSegments(*parsed, "too", "long", "too", "long"));
+
+    EXPECT_FALSE(
+        readUrlSegments(*parsed, std::ref(out1), "v2", std::ref(out2)));
+
+    EXPECT_FALSE(readUrlSegments(*parsed, "redfish", std::ref(out1),
+                                 std::ref(out2), std::ref(out3)));
+
+    parsed = boost::urls::parse_relative_ref("/absolute/url");
+    EXPECT_TRUE(readUrlSegments(*parsed, "absolute", "url"));
+
+    parsed = boost::urls::parse_relative_ref("not/absolute/url");
+    EXPECT_FALSE(readUrlSegments(*parsed, "not", "absolute", "url"));
+}
+
 TEST(Utility, ValidateAndSplitUrlPositive)
 {
     using crow::utility::validateAndSplitUrl;
@@ -152,8 +207,8 @@
         validateAndSplitUrl("https://foo.com/bar", urlProto, host, port, path));
     EXPECT_EQ(port, "443");
 
-    // If http push eventing is allowed, allow http, if it's not, parse should
-    // fail.
+    // If http push eventing is allowed, allow http, if it's not, parse
+    // should fail.
 #ifdef BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING
     ASSERT_TRUE(
         validateAndSplitUrl("http://foo.com/bar", urlProto, host, port, path));
diff --git a/http/utility.hpp b/http/utility.hpp
index 52a72b6..f7e456b 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -18,6 +18,7 @@
 #include <tuple>
 #include <type_traits>
 #include <utility>
+#include <variant>
 
 namespace crow
 {
@@ -669,6 +670,69 @@
     return details::urlFromPiecesDetail({args...});
 }
 
+namespace details
+{
+
+// std::reference_wrapper<std::string> - extracts segment to variable
+//                    std::string_view - checks if segment is equal to variable
+using UrlSegment =
+    std::variant<std::reference_wrapper<std::string>, std::string_view>;
+
+class UrlSegmentMatcherVisitor
+{
+  public:
+    bool operator()(std::string& output)
+    {
+        output = std::string_view(segment.data(), segment.size());
+        return true;
+    }
+
+    bool operator()(std::string_view expected)
+    {
+        return std::string_view(segment.data(), segment.size()) == expected;
+    }
+
+    UrlSegmentMatcherVisitor(const boost::urls::string_value& segmentIn) :
+        segment(segmentIn)
+    {}
+
+  private:
+    const boost::urls::string_value& segment;
+};
+
+inline bool readUrlSegments(const boost::urls::url_view& urlView,
+                            std::initializer_list<UrlSegment>&& segments)
+{
+    const boost::urls::segments_view& urlSegments = urlView.segments();
+
+    if (!urlSegments.is_absolute() || segments.size() != urlSegments.size())
+    {
+        return false;
+    }
+
+    boost::urls::segments_view::iterator it = urlSegments.begin();
+    boost::urls::segments_view::iterator end = urlSegments.end();
+
+    for (const auto& segment : segments)
+    {
+        if (!std::visit(UrlSegmentMatcherVisitor(*it), segment))
+        {
+            return false;
+        }
+        it++;
+    }
+    return true;
+}
+
+} // namespace details
+
+template <typename... Args>
+inline bool readUrlSegments(const boost::urls::url_view& urlView,
+                            Args&&... args)
+{
+    return details::readUrlSegments(urlView, {std::forward<Args>(args)...});
+}
+
 inline bool validateAndSplitUrl(std::string_view destUrl, std::string& urlProto,
                                 std::string& host, std::string& port,
                                 std::string& path)
