microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.01k stars 1.66k forks source link

How can I reduce data consumption of API calls? #1637

Closed undali closed 3 years ago

undali commented 3 years ago

I'm using cpprestsdk for a while. It's using ~8KB for a single trivial API call. Wireshark shows most of the data are consumed while negotiating TLS (certificate exchange etc.)

How can I reduce this data consumption? Does cpprestsdk supports TLS session resume, HTTPS compression?

barcharcraz commented 3 years ago

try setting http_config.set_request_compressed_response Assuming you built cpprestsdk with compression support this will turn on gzip compression.

I don't think we support session resume, but you may be able to poke the underlying TLS implementation (OpenSSL, etc) to get that to work.

We don't, and probably will never, support http/2 or http/3.