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

CURLOPT_HTTPGET documentation suggestion #2590

Closed
bsammon opened this issue May 21, 2018 · 1 comment
Closed

CURLOPT_HTTPGET documentation suggestion #2590

bsammon opened this issue May 21, 2018 · 1 comment

Comments

@bsammon
Copy link

bsammon commented May 21, 2018

reading the manpage for CURLOPT_HTTPGET, it is unclear to me whether if is ever necessary/useful to pass a value other than 1 for "useget"

Some possibilities occur to me:

  1. You should do a setopt for CURLOPT_HTTPGET with useget of 0 whenever you switch from GET to POST or another method, and aren't doing curl_easy_reset()
  2. You don't need to do a setopt for CURLOPT_HTTPGET when switching from GET to POST because setting CURLOPT_POST or the equivalent for other methods automatically sets CURLOPT_HTTPGET to 0.
  3. If you need to set CURLOPT_HTTPGET to 0, you're doing things wrong and should be calling curl_easy_reset() more often.

It would be useful if the CURLOPT_HTTPGET manpage contained documentation about this. Probably only a single added sentence would do.

I suspect this suggestion is applicable to the manpage for CURLOPT_POST as well.

@bagder
Copy link
Member

bagder commented May 21, 2018

Right, setting CURLOPT_HTTPGET to 0 has no effect at all. I'll polish the wording a bit to make this clearer.

@bagder bagder closed this as completed in d5a2df5 May 21, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants