diff options
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, | |||
| 93 | xs_dict *response; | 93 | xs_dict *response; |
| 94 | CURL *curl; | 94 | CURL *curl; |
| 95 | struct curl_slist *list = NULL; | 95 | struct curl_slist *list = NULL; |
| 96 | xs_dict *p; | ||
| 97 | xs_str *k; | 96 | xs_str *k; |
| 98 | xs_val *v; | 97 | xs_val *v; |
| 99 | long lstatus = 0; | 98 | long lstatus = 0; |
| @@ -147,8 +146,8 @@ xs_dict *xs_http_request(const char *method, const char *url, | |||
| 147 | } | 146 | } |
| 148 | 147 | ||
| 149 | /* fill the request headers */ | 148 | /* fill the request headers */ |
| 150 | p = (xs_dict *)headers; | 149 | int c = 0; |
| 151 | while (xs_dict_iter(&p, &k, &v)) { | 150 | while (xs_dict_next(headers, &k, &v, &c)) { |
| 152 | xs *h = xs_fmt("%s: %s", k, v); | 151 | xs *h = xs_fmt("%s: %s", k, v); |
| 153 | 152 | ||
| 154 | list = curl_slist_append(list, h); | 153 | list = curl_slist_append(list, h); |