From b24e0bdf48e6e4ec2cab90bec1f4a03d26cdfd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Mon, 19 Jul 2021 14:08:38 +0800 Subject: Implementations don't need the CURL* object that much --- pikul.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pikul.c') diff --git a/pikul.c b/pikul.c index bd3a147..11bcdf3 100644 --- a/pikul.c +++ b/pikul.c @@ -62,6 +62,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); @@ -133,6 +135,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); -- cgit v1.2.3