We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e2bf01 commit a71f602Copy full SHA for a71f602
src/generic/CurlClient.cpp
@@ -73,9 +73,10 @@ HTTPSClient::Reply CurlClient::request(const HTTPSClient::Request &req)
73
curl.easy_setopt(handle, CURLOPT_URL, req.url.c_str());
74
curl.easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
75
76
- if (req.method == Request::POST)
+ if (req.postdata.size() > 0 && (req.method != "GET" && req.method != "HEAD"))
77
{
78
- curl.easy_setopt(handle, CURLOPT_POST, 1L);
+ //curl.easy_setopt(handle, CURLOPT_POST, 1L);
79
+ curl.easy_setopt(handle, CURLOPT_CUSTOMREQUEST, req.method.c_str());
80
curl.easy_setopt(handle, CURLOPT_POSTFIELDS, req.postdata.c_str());
81
curl.easy_setopt(handle, CURLOPT_POSTFIELDSIZE, req.postdata.size());
82
}
0 commit comments