The original curl option CURLOPT_ACCEPT_ENCODING let disabling the content-encoding functionality when you pass NULL as the parameter, instead of using the empty string (which means enable the functionality and accept all known encodings). The actual implementation in cpr let us choose the encoding but not disabling the functionality.
It is necessary due to some old servers incorrectly returning "Content-Enconding: UTF-8" making interoperability impossible.
@obelixzgz Thanks for your feature request!
I created a PR for it here: https://github.com/libcpr/cpr/pull/926
Could you please try if this one fulfils your needs?
Is your feature request related to a problem?
The original curl option CURLOPT_ACCEPT_ENCODING let disabling the content-encoding functionality when you pass NULL as the parameter, instead of using the empty string (which means enable the functionality and accept all known encodings). The actual implementation in cpr let us choose the encoding but not disabling the functionality.
It is necessary due to some old servers incorrectly returning "Content-Enconding: UTF-8" making interoperability impossible.
Possible Solution
Add a new encoding method "none", that makes
curl_easysetopt(curl->handle, CURLOPT_ACCEPT_ENCODING, null);
in cpr/session.cpp
Alternatives
No response
Additional Context
No response