CURLOPT_HTTPGET documentation suggestion #2590

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

Comments

Projects
None yet
2 participants
@bsammon

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

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder May 21, 2018

Member

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

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 in d5a2df5 May 21, 2018

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