summaryrefslogtreecommitdiff
path: root/http/utility.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2023-04-25 01:28:50 +0300
committerEd Tanous <ed@tanous.net>2023-05-16 19:05:33 +0300
commitef4c65b741724d724452a3a0efe8dff0d450514a (patch)
tree9667bdff1dd9d2dbeac94bc8bd46efd83177512b /http/utility.hpp
parenta87c4180fd7f2127960fbc4c89c31b7659f0cfb8 (diff)
downloadbmcweb-ef4c65b741724d724452a3a0efe8dff0d450514a.tar.xz
Boost::urls::format
Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot like our urlFromPieces method, but better in that it makes the resulting uris more readable, and allows doing things like fragments in a single line instead of multiple. We should prefer it in some cases. Tested: Redfish service validator passes. Spot checks of URLs work as expected. Unit tests pass. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ia7b38f0a95771c862507e7d5b4aa68aa1c98403c
Diffstat (limited to 'http/utility.hpp')
-rw-r--r--http/utility.hpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/http/utility.hpp b/http/utility.hpp
index 6717327bea..aa64043132 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -401,25 +401,12 @@ inline boost::urls::url
return url;
}
-inline boost::urls::url
- urlFromPiecesDetail(const std::initializer_list<std::string_view> args)
-{
- boost::urls::url url("/");
- appendUrlPieces(url, args);
- return url;
-}
} // namespace details
class OrMorePaths
{};
template <typename... AV>
-inline boost::urls::url urlFromPieces(const AV... args)
-{
- return details::urlFromPiecesDetail({args...});
-}
-
-template <typename... AV>
inline void appendUrlPieces(boost::urls::url& url, const AV... args)
{
details::appendUrlPieces(url, {args...});