Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples recommends deprecated CURLOPT_PUT #6186

jeroen opened this issue Nov 8, 2020 · 1 comment

Examples recommends deprecated CURLOPT_PUT #6186

jeroen opened this issue Nov 8, 2020 · 1 comment


Copy link

jeroen commented Nov 8, 2020

Googling how to perform a PUT with libcurl sends you to the httpput.c example which uses CURLOPT_PUT:

/* HTTP PUT please */
curl_easy_setopt(curl, CURLOPT_PUT, 1L);

But the manual page for this option says "Deprecated, don't use". So maybe the example should be updated?

bagder added a commit that referenced this issue Nov 9, 2020
It is deprecated and unnecessary since it already sets CURLOPT_UPLOAD.
Reported-by: Jeroen Ooms
Fixes #6186
@bagder bagder self-assigned this Nov 9, 2020
Copy link
Contributor Author

jeroen commented Nov 9, 2020

As a side-note, it would be useful if the example would also illustrate how to perform a PUT using CURLOPT_POSTFIELDS instead of a file upload. That is what most clients are usually more interested in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging a pull request may close this issue.

2 participants