1- #include < fstream>
21#include " libcpp-http-client.hpp"
32
43using namespace lklibs ;
@@ -188,14 +187,14 @@ void ignoreSslErrors()
188187 std::cout << " Data: " << response.textData << std::endl;
189188}
190189
191- void setUploadAndDownloadBandwidthLimit ()
190+ void setDownloadAndUploadBandwidthLimit ()
192191{
193192 HttpRequest httpRequest (" https://httpbun.com/get" );
194193
195- // You can set the upload and download bandwidth limit in bytes per second
194+ // You can set the download and upload bandwidth limit in bytes per second
196195 auto response = httpRequest
197- .setUploadBandwidthLimit ( 20480 ) // 2 KB/sec
198- .setDownloadBandwidthLimit ( 10240 ) // 1 KB/sec
196+ .setDownloadBandwidthLimit ( 10240 ) // 10 KB/sec
197+ .setUploadBandwidthLimit ( 20480 ) // 20 KB/sec
199198 .send ()
200199 .get ();
201200
@@ -207,29 +206,29 @@ void setUploadAndDownloadBandwidthLimit()
207206
208207int main ()
209208{
210- // simpleGet();
211- //
212- // nonBlockingGet();
213- //
214- // receiveBinaryData();
215- //
216- // receiveError();
217- //
218- // sendingHttpHeaders();
219- //
220- // simplePostWithFormData();
221- //
222- // simplePostWithJSONData();
223- //
224- // simplePutWithFormData();
225- //
226- // simpleDeleteWithFormData();
227- //
228- // simplePatch();
229- //
230- // ignoreSslErrors();
231-
232- setUploadAndDownloadBandwidthLimit ();
209+ simpleGet ();
210+
211+ nonBlockingGet ();
212+
213+ receiveBinaryData ();
214+
215+ receiveError ();
216+
217+ sendingHttpHeaders ();
218+
219+ simplePostWithFormData ();
220+
221+ simplePostWithJSONData ();
222+
223+ simplePutWithFormData ();
224+
225+ simpleDeleteWithFormData ();
226+
227+ simplePatch ();
228+
229+ ignoreSslErrors ();
230+
231+ setDownloadAndUploadBandwidthLimit ();
233232
234233 return 0 ;
235234}
0 commit comments