@@ -1319,6 +1319,7 @@ class ClientImpl {
1319
1319
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, UploadProgress progress = nullptr );
1320
1320
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const std::string &boundary, UploadProgress progress = nullptr );
1321
1321
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const MultipartFormDataProviderItems &provider_items, UploadProgress progress = nullptr );
1322
+ Result Post (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, ContentReceiver content_receiver, DownloadProgress progress = nullptr );
1322
1323
1323
1324
Result Put (const std::string &path);
1324
1325
Result Put (const std::string &path, const char *body, size_t content_length, const std::string &content_type, UploadProgress progress = nullptr );
@@ -1336,6 +1337,7 @@ class ClientImpl {
1336
1337
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, UploadProgress progress = nullptr );
1337
1338
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const std::string &boundary, UploadProgress progress = nullptr );
1338
1339
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const MultipartFormDataProviderItems &provider_items, UploadProgress progress = nullptr );
1340
+ Result Put (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, ContentReceiver content_receiver, DownloadProgress progress = nullptr );
1339
1341
1340
1342
Result Patch (const std::string &path);
1341
1343
Result Patch (const std::string &path, const char *body, size_t content_length, const std::string &content_type, UploadProgress progress = nullptr );
@@ -1353,6 +1355,7 @@ class ClientImpl {
1353
1355
Result Patch (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, UploadProgress progress = nullptr );
1354
1356
Result Patch (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const std::string &boundary, UploadProgress progress = nullptr );
1355
1357
Result Patch (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const MultipartFormDataProviderItems &provider_items, UploadProgress progress = nullptr );
1358
+ Result Patch (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, ContentReceiver content_receiver, DownloadProgress progress = nullptr );
1356
1359
1357
1360
Result Delete (const std::string &path, DownloadProgress progress = nullptr );
1358
1361
Result Delete (const std::string &path, const char *body, size_t content_length, const std::string &content_type, DownloadProgress progress = nullptr );
@@ -1662,6 +1665,7 @@ class Client {
1662
1665
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, UploadProgress progress = nullptr );
1663
1666
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const std::string &boundary, UploadProgress progress = nullptr );
1664
1667
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const MultipartFormDataProviderItems &provider_items, UploadProgress progress = nullptr );
1668
+ Result Post (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, ContentReceiver content_receiver, DownloadProgress progress = nullptr );
1665
1669
1666
1670
Result Put (const std::string &path);
1667
1671
Result Put (const std::string &path, const char *body, size_t content_length, const std::string &content_type, UploadProgress progress = nullptr );
@@ -1679,6 +1683,7 @@ class Client {
1679
1683
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, UploadProgress progress = nullptr );
1680
1684
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const std::string &boundary, UploadProgress progress = nullptr );
1681
1685
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const MultipartFormDataProviderItems &provider_items, UploadProgress progress = nullptr );
1686
+ Result Put (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, ContentReceiver content_receiver, DownloadProgress progress = nullptr );
1682
1687
1683
1688
Result Patch (const std::string &path);
1684
1689
Result Patch (const std::string &path, const char *body, size_t content_length, const std::string &content_type, UploadProgress progress = nullptr );
@@ -1696,6 +1701,7 @@ class Client {
1696
1701
Result Patch (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, UploadProgress progress = nullptr );
1697
1702
Result Patch (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const std::string &boundary, UploadProgress progress = nullptr );
1698
1703
Result Patch (const std::string &path, const Headers &headers, const MultipartFormDataItemsForClientInput &items, const MultipartFormDataProviderItems &provider_items, UploadProgress progress = nullptr );
1704
+ Result Patch (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, ContentReceiver content_receiver, DownloadProgress progress = nullptr );
1699
1705
1700
1706
Result Delete (const std::string &path, DownloadProgress progress = nullptr );
1701
1707
Result Delete (const std::string &path, const char *body, size_t content_length, const std::string &content_type, DownloadProgress progress = nullptr );
@@ -9115,6 +9121,32 @@ ClientImpl::Post(const std::string &path, const Headers &headers,
9115
9121
content_type, progress);
9116
9122
}
9117
9123
9124
+ inline Result ClientImpl::Post (const std::string &path, const Headers &headers,
9125
+ const std::string &body,
9126
+ const std::string &content_type,
9127
+ ContentReceiver content_receiver,
9128
+ DownloadProgress progress) {
9129
+ Request req;
9130
+ req.method = " POST" ;
9131
+ req.path = path;
9132
+ req.headers = headers;
9133
+ req.body = body;
9134
+ req.content_receiver =
9135
+ [content_receiver](const char *data, size_t data_length,
9136
+ uint64_t /* offset*/ , uint64_t /* total_length*/ ) {
9137
+ return content_receiver (data, data_length);
9138
+ };
9139
+ req.download_progress = std::move (progress);
9140
+
9141
+ if (max_timeout_msec_ > 0 ) {
9142
+ req.start_time_ = std::chrono::steady_clock::now ();
9143
+ }
9144
+
9145
+ if (!content_type.empty ()) { req.set_header (" Content-Type" , content_type); }
9146
+
9147
+ return send_ (std::move (req));
9148
+ }
9149
+
9118
9150
inline Result ClientImpl::Put (const std::string &path) {
9119
9151
return Put (path, std::string (), std::string ());
9120
9152
}
@@ -9242,6 +9274,32 @@ ClientImpl::Put(const std::string &path, const Headers &headers,
9242
9274
content_type, progress);
9243
9275
}
9244
9276
9277
+ inline Result ClientImpl::Put (const std::string &path, const Headers &headers,
9278
+ const std::string &body,
9279
+ const std::string &content_type,
9280
+ ContentReceiver content_receiver,
9281
+ DownloadProgress progress) {
9282
+ Request req;
9283
+ req.method = " PUT" ;
9284
+ req.path = path;
9285
+ req.headers = headers;
9286
+ req.body = body;
9287
+ req.content_receiver =
9288
+ [content_receiver](const char *data, size_t data_length,
9289
+ uint64_t /* offset*/ , uint64_t /* total_length*/ ) {
9290
+ return content_receiver (data, data_length);
9291
+ };
9292
+ req.download_progress = std::move (progress);
9293
+
9294
+ if (max_timeout_msec_ > 0 ) {
9295
+ req.start_time_ = std::chrono::steady_clock::now ();
9296
+ }
9297
+
9298
+ if (!content_type.empty ()) { req.set_header (" Content-Type" , content_type); }
9299
+
9300
+ return send_ (std::move (req));
9301
+ }
9302
+
9245
9303
inline Result ClientImpl::Patch (const std::string &path) {
9246
9304
return Patch (path, std::string (), std::string ());
9247
9305
}
@@ -9374,6 +9432,32 @@ ClientImpl::Patch(const std::string &path, const Headers &headers,
9374
9432
content_type, progress);
9375
9433
}
9376
9434
9435
+ inline Result ClientImpl::Patch (const std::string &path, const Headers &headers,
9436
+ const std::string &body,
9437
+ const std::string &content_type,
9438
+ ContentReceiver content_receiver,
9439
+ DownloadProgress progress) {
9440
+ Request req;
9441
+ req.method = " PATCH" ;
9442
+ req.path = path;
9443
+ req.headers = headers;
9444
+ req.body = body;
9445
+ req.content_receiver =
9446
+ [content_receiver](const char *data, size_t data_length,
9447
+ uint64_t /* offset*/ , uint64_t /* total_length*/ ) {
9448
+ return content_receiver (data, data_length);
9449
+ };
9450
+ req.download_progress = std::move (progress);
9451
+
9452
+ if (max_timeout_msec_ > 0 ) {
9453
+ req.start_time_ = std::chrono::steady_clock::now ();
9454
+ }
9455
+
9456
+ if (!content_type.empty ()) { req.set_header (" Content-Type" , content_type); }
9457
+
9458
+ return send_ (std::move (req));
9459
+ }
9460
+
9377
9461
inline Result ClientImpl::Delete (const std::string &path,
9378
9462
DownloadProgress progress) {
9379
9463
return Delete (path, Headers (), std::string (), std::string (), progress);
@@ -10679,6 +10763,14 @@ inline Result Client::Post(const std::string &path, const Headers &headers,
10679
10763
UploadProgress progress) {
10680
10764
return cli_->Post (path, headers, items, provider_items, progress);
10681
10765
}
10766
+ inline Result Client::Post (const std::string &path, const Headers &headers,
10767
+ const std::string &body,
10768
+ const std::string &content_type,
10769
+ ContentReceiver content_receiver,
10770
+ DownloadProgress progress) {
10771
+ return cli_->Post (path, headers, body, content_type, content_receiver,
10772
+ progress);
10773
+ }
10682
10774
10683
10775
inline Result Client::Put (const std::string &path) { return cli_->Put (path); }
10684
10776
inline Result Client::Put (const std::string &path, const Headers &headers) {
@@ -10764,6 +10856,14 @@ inline Result Client::Put(const std::string &path, const Headers &headers,
10764
10856
UploadProgress progress) {
10765
10857
return cli_->Put (path, headers, items, provider_items, progress);
10766
10858
}
10859
+ inline Result Client::Put (const std::string &path, const Headers &headers,
10860
+ const std::string &body,
10861
+ const std::string &content_type,
10862
+ ContentReceiver content_receiver,
10863
+ DownloadProgress progress) {
10864
+ return cli_->Put (path, headers, body, content_type, content_receiver,
10865
+ progress);
10866
+ }
10767
10867
10768
10868
inline Result Client::Patch (const std::string &path) {
10769
10869
return cli_->Patch (path);
@@ -10853,6 +10953,14 @@ Client::Patch(const std::string &path, const Headers &headers,
10853
10953
UploadProgress progress) {
10854
10954
return cli_->Patch (path, headers, items, provider_items, progress);
10855
10955
}
10956
+ inline Result Client::Patch (const std::string &path, const Headers &headers,
10957
+ const std::string &body,
10958
+ const std::string &content_type,
10959
+ ContentReceiver content_receiver,
10960
+ DownloadProgress progress) {
10961
+ return cli_->Patch (path, headers, body, content_type, content_receiver,
10962
+ progress);
10963
+ }
10856
10964
10857
10965
inline Result Client::Delete (const std::string &path,
10858
10966
DownloadProgress progress) {
0 commit comments