diff options
| author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-19 14:08:38 +0800 |
|---|---|---|
| committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-19 14:08:38 +0800 |
| commit | b24e0bdf48e6e4ec2cab90bec1f4a03d26cdfd50 (patch) | |
| tree | 1e218a860d74f9a3e88616fe1a3e859f1ab61f4e /pikul.c | |
| parent | c954ef683bce2217fc81723ba79d0b53b01de2e2 (diff) | |
Implementations don't need the CURL* object that much
Diffstat (limited to 'pikul.c')
| -rw-r--r-- | pikul.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |