summaryrefslogtreecommitdiff
path: root/xs_curl.h
diff options
context:
space:
mode:
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,
127 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _data_callback); 127 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _data_callback);
128 128
129 if (strcmp(method, "POST") == 0 || strcmp(method, "PUT") == 0) { 129 if (strcmp(method, "POST") == 0 || strcmp(method, "PUT") == 0) {
130 curl_easy_setopt(curl, method[1] == 'O' ? CURLOPT_POST : CURLOPT_PUT, 1L); 130 curl_easy_setopt(curl, method[1] == 'O' ? CURLOPT_POST : CURLOPT_UPLOAD, 1L);
131 131
132 if (body != NULL) { 132 if (body != NULL) {
133 if (b_size <= 0) 133 if (b_size <= 0)