summaryrefslogtreecommitdiff
path: root/sicepat.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-19 14:10:55 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-19 14:10:55 +0800
commit531aaf6e9d01a4ae3257579996681bbe8246630f (patch)
treec8f587a49a503f5ceca59414bd4b1d62740c6af6 /sicepat.c
parentd943e6dd7e6971309db8c3ef25132cc69a68a52b (diff)
Implementations don't need the CURL* object that much
Diffstat (limited to 'sicepat.c')
-rw-r--r--sicepat.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sicepat.c b/sicepat.c
index 955f043..1fedbfd 100644
--- a/sicepat.c
+++ b/sicepat.c
@@ -2,8 +2,6 @@
#define BASE "http://api.sicepat.com/customer/"
-extern CURL *curl;
-
static const char *status_trail[] = {
"sicepat",
"status",
@@ -22,9 +20,8 @@ void sicepat_services(const char *origin, const char *destination, double weight
{
*url = malloc(strlen(shipping.base) + strlen("tariff?origin=") + strlen(origin)
+ strlen("&destination=") + strlen(destination) + strlen("&weight=") + 9);
- sprintf(*url, "%stariff?origin=%s&destination=%s&weight=%f", shipping.base,
- origin, destination, weight);
- curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
+ sprintf(*url, "%stariff?origin=%s&destination=%s&weight=%f", shipping.base, origin, destination,
+ weight);
}
size_t sicepat_services_handle(const char *contents, size_t size, size_t nmemb,