diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-19 14:10:55 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-19 14:10:55 +0800 |
commit | 531aaf6e9d01a4ae3257579996681bbe8246630f (patch) | |
tree | c8f587a49a503f5ceca59414bd4b1d62740c6af6 /pikul.c | |
parent | d943e6dd7e6971309db8c3ef25132cc69a68a52b (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
@@ -75,6 +75,8 @@ struct pikul_services *pikul_services(const char *origin, const char *destinatio curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, handler); if (post) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post); + else + curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_perform(curl); if (post) free(post); @@ -148,6 +150,8 @@ char *pikul_order(const char *order_number, const char *service, const char *sen curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, handler); if (post) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post); + else + curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_perform(curl); if (post) free(post); |