summaryrefslogtreecommitdiff
path: root/xs_curl.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-08-30 19:10:26 +0200
committerdefault <nobody@localhost>2024-08-30 19:10:26 +0200
commit0218e964b0d73340c8d0c5d9e37991359d7c4be9 (patch)
tree9cfc1650abf8780be52dc219e37a311244a294e2 /xs_curl.h
parentbff33fc2eda701ff5d6cd8433c15dfd9aca768f7 (diff)
Backport from xs.
Diffstat (limited to 'xs_curl.h')
-rw-r--r--xs_curl.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/xs_curl.h b/xs_curl.h
index 215db7f..9b4c229 100644
--- a/xs_curl.h
+++ b/xs_curl.h
@@ -146,8 +146,7 @@ xs_dict *xs_http_request(const char *method, const char *url,
}
/* fill the request headers */
- int c = 0;
- while (xs_dict_next(headers, &k, &v, &c)) {
+ xs_dict_foreach(headers, k, v) {
xs *h = xs_fmt("%s: %s", k, v);
list = curl_slist_append(list, h);