diff options
Diffstat (limited to 'src/http.c')
-rw-r--r-- | src/http.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -76,9 +76,16 @@ static struct http_response *trg_http_perform_inner(trg_client * tc, curl_easy_setopt(handle, CURLOPT_HEADERFUNCTION, &header_callback); curl_easy_setopt(handle, CURLOPT_WRITEHEADER, (void *) tc); curl_easy_setopt(handle, CURLOPT_POSTFIELDS, req); + if (tc->ssl) curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0); + if (tc->proxy) { + curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + curl_easy_setopt(handle, CURLOPT_PROXY, tc->proxy); + } + + if (tc->session_id != NULL) { headers = curl_slist_append(headers, tc->session_id); curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); |