diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-27 23:41:31 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-27 23:41:31 +0800 |
commit | 65a334cf2fe2d7d524c129f0df765463a91f542c (patch) | |
tree | d182a3e1b474dfd9329357154a1a618a199cdebb /shipping.c |
Shipping API client framework
with 1 module so far.
Diffstat (limited to 'shipping.c')
-rw-r--r-- | shipping.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shipping.c b/shipping.c new file mode 100644 index 0000000..f2e263c --- /dev/null +++ b/shipping.c @@ -0,0 +1,12 @@ +#include <string.h> +#include "shipping.h" + +void headers(struct shipping *shipping, const char *fields[], char *provisions[]) +{ + shipping->headers = NULL; + while (*fields) { + char header[strlen(*fields) + strlen(*provisions) + 2]; + sprintf(header, "%s:%s", *fields++, *provisions++); + shipping->headers = curl_slist_append(shipping->headers, header); + } +} |