Skip to content

Releases: libcpr/cpr

cpr v1.7.1 - Header and cpr::Session::Download

09 Dec 08:53
Compare
Choose a tag to compare

Small bug fix release.

Changes

  • Fixed setting headers when calling cpr::Session::Download(...).

Now something like this should work:

cpr::Url url{server->GetBaseUrl() + "/download_gzip.html"};
cpr::Session session;
session.SetUrl(url);
session.SetHeader(cpr::Header{{"Accept-Encoding", "gzip"}}); // Works now
cpr::Response response = session.Download(cpr::WriteCallback{write_data, 0});

cpr v1.7.0

24 Nov 12:57
bcb7729
Compare
Choose a tag to compare
  • Added a Cppcheck CI run
  • Fixed automated libcurl ca path detection
  • Fixed missing raw_header in cpr::Response
  • Fixed bugprone narrowing conversions
  • Fixed MaxRedirects exceeded should be treated as error
  • Updated libcurl from 7.75.0 to 7.79.1
  • Fixed cprConfig.cmake when building cpr as a submodule
  • Added cpr version macros in cprver.h
  • Fixed CMake paths for subprojects
  • Updated zlib-ng from 2.0.0-RC2 to 2.0.5
  • Fixed usage of CPR_USE_SYSTEM_GTEST
  • Added CMake find-package support
  • Added more redirect options:
    • cont_send_cred: Continue to send authentication (user+password) credentials when following locations, even when hostname changed.
  • Added an option to specify the HTML version with SetHttpVersion(...)
  • Fixed respecting system proxy configuration
  • Added an option to select the outgoing interface with SetInterface(...)
  • Added an option to get the file download length GetDownloadFileLength(...)
  • Updated Google Tests from 1.10.0 to 1.11.0
  • Added proxy authentication
  • Don't forcibly override user setting for FETCHCONTENT_QUIET

cpr v1.6.2

27 Apr 17:04
Compare
Choose a tag to compare
  • Fix MSVC build; linker flags for sanitizer builds #558

cpr v1.6.1

27 Apr 15:31
Compare
Choose a tag to compare

Minor feature and bugfix release with the following changes:

  • Added MacOS darwin-ssl support #549
  • Added an option to split a request preparation from its execution #533
  • cpr::Session is now movable #544
  • Not overriding BUILD_TESTING as cache variable any more #561
  • Avoid recursive template instantiation in priv::set_option() #540
  • Do not move targets in to a bin if cpr is a sub project #531

cpr v1.6.0

19 Mar 16:23
Compare
Choose a tag to compare

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

cpr v1.5.2

20 Oct 13:33
Compare
Choose a tag to compare

This hotfix for v1.5.1 includes the following fixes:

  • Fixed: cpr::Post wrong content length (#450, #456, #458)
  • Fixed: Mutex for multithreaded access not being static
  • Fixed: No const rvalue references (#424)

cpr v1.5.1

08 Jul 12:36
5e87cb5
Compare
Choose a tag to compare

Changes

  • CMake add ability to use WINSSL (#404)
  • Thread save access to libCurl (#313)
  • Allow implicit creation of cpr:Url, cpr:Body and cpr:UserAgent (#411)
  • Payload with string variables (#409)
  • Cleanup (#407, #408)

cpr v1.5.0

22 Jun 15:20
Compare
Choose a tag to compare

Changes

  • Updated CURL to curl-7_69_1 (#343)
  • Updated mongoose to 6.18
  • Updated googletest to release-1.10.0
  • Refactored the mongoose test server setup
  • Added SSL options (#276)
  • Fixed URL encoding (#379)
  • Fixed Windows std::min type deduction
  • GitHub Actions CI (#393)
  • Refactored all the CMake stuff (#383)
  • Fixed passing correct data type when setting CURLOPT_POSTFIELDSIZE_LARGE
  • Switched Body, UserAgent and Url from std::string derivation classes to string holder classes (#303)
  • General cleanup of the code base

cpr v1.4.0

30 Apr 04:25
3f76ef3
Compare
Choose a tag to compare
Merge pull request #370 from whoshuu/cookie_encoding

Added an option to disable cookie encoding #369