diff options
Diffstat (limited to 'src/connection.cpp')
-rw-r--r-- | src/connection.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index 794247b..f471c4e 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -29,16 +29,16 @@ Connection::Connection(Instance &instance) answer_type Connection::get(const endpoint_variant &endpoint, const parametermap ¶meters) { - string uri{[&] + const string uri{[&] { if (holds_alternative<API::endpoint_type>(endpoint)) { return string(_baseuri).append( API{std::get<API::endpoint_type>(endpoint)}.to_string_view()); } - - return std::get<string>(endpoint); + return string(std::get<string_view>(endpoint)); }()}; + return make_request(http_method::GET, uri, parameters); } |