CURLOPT_HTTP_CONTENT_DECODING.3 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .\" generated by cd2nroff 0.1 from CURLOPT_HTTP_CONTENT_DECODING.md
  2. .TH CURLOPT_HTTP_CONTENT_DECODING 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_HTTP_CONTENT_DECODING \- HTTP content decoding control
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_CONTENT_DECODING,
  9. long enabled);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a long to tell libcurl how to act on content decoding. If set to zero,
  13. content decoding is disabled. If set to 1 it is enabled. Libcurl has no
  14. default content decoding but requires you to use
  15. \fICURLOPT_ACCEPT_ENCODING(3)\fP for that.
  16. .SH DEFAULT
  17. 1
  18. .SH PROTOCOLS
  19. This functionality affects http only
  20. .SH EXAMPLE
  21. .nf
  22. int main(void)
  23. {
  24. CURL *curl = curl_easy_init();
  25. if(curl) {
  26. CURLcode ret;
  27. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  28. curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 0L);
  29. ret = curl_easy_perform(curl);
  30. }
  31. }
  32. .fi
  33. .SH AVAILABILITY
  34. Added in curl 7.16.2
  35. .SH RETURN VALUE
  36. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  37. .SH SEE ALSO
  38. .BR CURLOPT_ACCEPT_ENCODING (3),
  39. .BR CURLOPT_DEBUGFUNCTION (3),
  40. .BR CURLOPT_STDERR (3)