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
Labels

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 added the documentation label Nov 9, 2020
@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.

bagder added a commit that referenced this issue Nov 9, 2020
Proposed-by: Jeroen Ooms
Ref: #6186
@bagder bagder closed this in fa6bbbe Nov 9, 2020
bagder added a commit that referenced this issue Nov 13, 2020
Proposed-by: Jeroen Ooms
Ref: #6186
Closes #6188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.