summaryrefslogtreecommitdiff
path: root/xs_curl.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-03-30 10:49:08 +0200
committerdefault <nobody@localhost>2023-03-30 10:49:08 +0200
commit1b22dbb5dffe7b96e433d4d9df288774ce62c53f (patch)
treef9562a7bb85ab4002c4a67b527085f36b105c467 /xs_curl.h
parente187302ae72446e070e7b0da59b795cfe5a1b529 (diff)
Backport from xs.
Diffstat (limited to 'xs_curl.h')
-rw-r--r--xs_curl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_curl.h b/xs_curl.h
index 3291499..e880a0d 100644
--- a/xs_curl.h
+++ b/xs_curl.h
@@ -127,7 +127,7 @@ xs_dict *xs_http_request(const char *method, const char *url,
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _data_callback);
if (strcmp(method, "POST") == 0 || strcmp(method, "PUT") == 0) {
- curl_easy_setopt(curl, method[1] == 'O' ? CURLOPT_POST : CURLOPT_PUT, 1L);
+ curl_easy_setopt(curl, method[1] == 'O' ? CURLOPT_POST : CURLOPT_UPLOAD, 1L);
if (body != NULL) {
if (b_size <= 0)