summaryrefslogtreecommitdiff
path: root/xs_curl.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-09 08:32:20 +0100
committerdefault <nobody@localhost>2024-03-09 08:32:20 +0100
commit00b019b8902e9d319d855b9156f97f931923331c (patch)
tree3d17736c3884f119b3e223947bea31b6f5953ce1 /xs_curl.h
parente12af777993ca655f285e852ad0dbee6bdca014f (diff)
Backport from xs.
Diffstat (limited to 'xs_curl.h')
-rw-r--r--xs_curl.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/xs_curl.h b/xs_curl.h
index b08d902..f7783b9 100644
--- a/xs_curl.h
+++ b/xs_curl.h
@@ -93,7 +93,6 @@ xs_dict *xs_http_request(const char *method, const char *url,
xs_dict *response;
CURL *curl;
struct curl_slist *list = NULL;
- xs_dict *p;
xs_str *k;
xs_val *v;
long lstatus = 0;
@@ -147,8 +146,8 @@ xs_dict *xs_http_request(const char *method, const char *url,
}
/* fill the request headers */
- p = (xs_dict *)headers;
- while (xs_dict_iter(&p, &k, &v)) {
+ int c = 0;
+ while (xs_dict_next(headers, &k, &v, &c)) {
xs *h = xs_fmt("%s: %s", k, v);
list = curl_slist_append(list, h);