summaryrefslogtreecommitdiffstats
path: root/src/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.cpp')
-rw-r--r--src/connection.cpp6
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 &parameters)
{
- 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);
}
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198