github libcpr/cpr 1.6.0
cpr v1.6.0

latest releases: 1.11.0, 1.9.8, 1.10.5...
3 years ago

In this release the CMake integration has been refactored to fix a bunch of SSL issues.
During this change all relevant CMake variable names changed.
Here are the new ones:

-- =======================================================
--   CPR_GENERATE_COVERAGE: OFF
--   CPR_CURL_NOSIGNAL: OFF
--   CPR_USE_SYSTEM_GTEST: OFF
--   CPR_FORCE_USE_SYSTEM_CURL: OFF
--   CPR_ENABLE_SSL: ON
--   CPR_FORCE_OPENSSL_BACKEND: OFF
--   CPR_FORCE_WINSSL_BACKEND: OFF
--   CPR_BUILD_TESTS: ON
--   CPR_BUILD_TESTS_SSL: ON
-- =======================================================

Documentation for those can be found here: https://github.com/whoshuu/cpr/blob/aac5058a15e9ad5ad393973dc6fe44d7614a7f55/CMakeLists.txt#L30-L40

If neither CPR_FORCE_OPENSSL_BACKEND nore CPR_FORCE_WINSSL_BACKEND has been set to ON, CMake will try to automatically detect the best SSL backend for your system (WinSSL - Windows, OpenSSL - Linux & Mac, ...).

How to build on Windows

With WinSSL

mkdir build
cd build
cmake .. -DCPR_BUILD_TESTS_SSL=OFF # SSL test are only supported with OpenSSL
cmake --build .

With OpenSSL

mkdir build
cd build
cmake .. -DCPR_FORCE_OPENSSL_BACKEND=ON # Disable auto detect and force OpenSSL
cmake --build .

Changes

  • Added support for GCC10 static analysis
  • Added an option to retrieve the std::shared_ptr<CurlHolder> from a session
  • Added UpdateHeader(const Header& header) support #506
  • Added support for retrieving certificate information #453
  • Added urlDecode(std::string) for url decoding
  • Add BearerToken support #465
  • Explicit move operator for StringHolder
  • cpr::Session cleanup and allow the compiler to generate the needed constructor
  • Updated curl from 7.69.1 to 7.75.0 #529
  • Compatibility for libcurl <= 7.60
  • Less auto and more explicit types
  • Refactored the CMake variables #529
  • Change listening ports used for tests
  • Fixed AbstractServer data race
  • Fixed Windows OpenSSL builds #529
  • Fixed Windows SSL backend detection #529
  • Fixed ReadCallback will reset Header #517
  • Fixed the Windows OpenSSL CI build

Don't miss a new cpr release

NewReleases is sending notifications on new releases.