Skip to content

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

Choose a tag to compare

@COM8 COM8 released this 09 Dec 08:53
· 975 commits to master since this release

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});