From 2c22ad068756d406c6c265720af1619bfd53bbb1 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sat, 5 Aug 2023 18:56:37 +0200 Subject: [PATCH] http: add additional malloy::to_string() overload --- lib/malloy/core/http/http.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/malloy/core/http/http.hpp b/lib/malloy/core/http/http.hpp index 4223dbdb..69513be4 100644 --- a/lib/malloy/core/http/http.hpp +++ b/lib/malloy/core/http/http.hpp @@ -1,5 +1,7 @@ #pragma once +#include "types.hpp" + /** * @namespace malloy::http * @@ -8,3 +10,23 @@ namespace malloy::http { } + + +namespace malloy +{ + + /** + * Convert HTTP method/verb to string. + * + * @param method The method. + * @return String representation. + */ + [[nodiscard]] + inline + std::string + to_string(const malloy::http::method method) + { + return boost::beast::http::to_string(method); + } + +} \ No newline at end of file