diff options
author | default <nobody@localhost> | 2024-03-09 08:32:20 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-03-09 08:32:20 +0100 |
commit | 00b019b8902e9d319d855b9156f97f931923331c (patch) | |
tree | 3d17736c3884f119b3e223947bea31b6f5953ce1 /xs_curl.h | |
parent | e12af777993ca655f285e852ad0dbee6bdca014f (diff) |
Backport from xs.
Diffstat (limited to 'xs_curl.h')
-rw-r--r-- | xs_curl.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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); |