summaryrefslogtreecommitdiff
path: root/pikul.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-19 14:09:04 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-19 14:09:04 +0800
commitd943e6dd7e6971309db8c3ef25132cc69a68a52b (patch)
tree7bb70603a0803373e1ab2106549c549e752d6cb0 /pikul.c
parent98fb2f7df3947ecb639e170f00bb156110eb2702 (diff)
parentb24e0bdf48e6e4ec2cab90bec1f4a03d26cdfd50 (diff)
Merge branch 'master' into sicepat
Diffstat (limited to 'pikul.c')
-rw-r--r--pikul.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pikul.c b/pikul.c
index fe43976..c8ac2b5 100644
--- a/pikul.c
+++ b/pikul.c
@@ -73,6 +73,8 @@ struct pikul_services *pikul_services(const char *origin, const char *destinatio
}
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, handler);
+ if (post)
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post);
curl_easy_perform(curl);
if (post)
free(post);
@@ -144,6 +146,8 @@ char *pikul_order(const char *order_number, const char *service, const char *sen
}
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, handler);
+ if (post)
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post);
curl_easy_perform(curl);
if (post)
free(post);