You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally speaking, it's better to use specialized arguments to create the right kind of request rather than manually specifying the HTTP method.
This guideline is clearly stated in curl's man page:
Normally you don't need this option. All sorts of GET, HEAD, POST and PUT requests are rather invoked by using dedicated command line options.
Nonetheless, there may be situations where a remote endpoint supports a different method than the one chosen by a given curl option.
For example, when you upload a file to an HTTP endpoint using the -T parameter, curl will by default issue a PUT request. Now, that won't work if the endpoint only supports POST. In those situations, you must be able to specify the HTTP method using the -X option:
curl -X POST -T file.txt http://host/path
It would be nice if CurlSettings supported the -X --request option directly.
The text was updated successfully, but these errors were encountered:
Generally speaking, it's better to use specialized arguments to create the right kind of request rather than manually specifying the HTTP method.
This guideline is clearly stated in curl's man page:
Nonetheless, there may be situations where a remote endpoint supports a different method than the one chosen by a given curl option.
For example, when you upload a file to an HTTP endpoint using the
-T
parameter, curl will by default issue aPUT
request. Now, that won't work if the endpoint only supportsPOST
. In those situations, you must be able to specify the HTTP method using the-X
option:It would be nice if CurlSettings supported the
-X --request
option directly.The text was updated successfully, but these errors were encountered: