Skip to content

Commit 773c184

Browse files
authored
Add Get(path, params) overload to ClientImpl and Client; fix ambiguous test calls
1 parent 7f26374 commit 773c184

2 files changed

Lines changed: 82 additions & 45 deletions

File tree

httplib.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,6 +2219,7 @@ class ClientImpl {
22192219
Result Get(const std::string &path, const Headers &headers, DownloadProgress progress = nullptr);
22202220
Result Get(const std::string &path, const Headers &headers, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
22212221
Result Get(const std::string &path, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
2222+
Result Get(const std::string &path, const Params &params, DownloadProgress progress = nullptr);
22222223
Result Get(const std::string &path, const Params &params, const Headers &headers, DownloadProgress progress = nullptr);
22232224
Result Get(const std::string &path, const Params &params, const Headers &headers, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
22242225
Result Get(const std::string &path, const Params &params, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
@@ -2602,6 +2603,7 @@ class Client {
26022603
Result Get(const std::string &path, const Headers &headers, DownloadProgress progress = nullptr);
26032604
Result Get(const std::string &path, const Headers &headers, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
26042605
Result Get(const std::string &path, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
2606+
Result Get(const std::string &path, const Params &params, DownloadProgress progress = nullptr);
26052607
Result Get(const std::string &path, const Params &params, const Headers &headers, DownloadProgress progress = nullptr);
26062608
Result Get(const std::string &path, const Params &params, const Headers &headers, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
26072609
Result Get(const std::string &path, const Params &params, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, DownloadProgress progress = nullptr);
@@ -14284,6 +14286,11 @@ inline Result ClientImpl::Get(const std::string &path,
1428414286
return Get(path, Headers(), std::move(progress));
1428514287
}
1428614288

14289+
inline Result ClientImpl::Get(const std::string &path, const Params &params,
14290+
DownloadProgress progress) {
14291+
return Get(path, params, Headers(), std::move(progress));
14292+
}
14293+
1428714294
inline Result ClientImpl::Get(const std::string &path, const Params &params,
1428814295
const Headers &headers,
1428914296
DownloadProgress progress) {
@@ -15362,6 +15369,10 @@ inline Result Client::Get(const std::string &path, const Headers &headers,
1536215369
return cli_->Get(path, headers, std::move(response_handler),
1536315370
std::move(content_receiver), std::move(progress));
1536415371
}
15372+
inline Result Client::Get(const std::string &path, const Params &params,
15373+
DownloadProgress progress) {
15374+
return cli_->Get(path, params, std::move(progress));
15375+
}
1536515376
inline Result Client::Get(const std::string &path, const Params &params,
1536615377
const Headers &headers, DownloadProgress progress) {
1536715378
return cli_->Get(path, params, headers, std::move(progress));

0 commit comments

Comments
 (0)