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

Closed
jeroen opened this issue Nov 8, 2020 · 1 comment
Closed

Examples recommends deprecated CURLOPT_PUT #6186

jeroen opened this issue Nov 8, 2020 · 1 comment
Assignees

Comments

@jeroen
Copy link
Contributor

@jeroen 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
@jeroen
Copy link
Contributor Author

@jeroen 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
Projects
None yet
Development

No branches or pull requests

2 participants