UI: Add alternate constructor for RemoteTextThread

Allows specifying extra headers.
This commit is contained in:
jp9000 2018-11-23 18:15:57 -08:00
commit 08e6dcd516
2 changed files with 18 additions and 0 deletions

View file

@ -61,6 +61,9 @@ void RemoteTextThread::run()
contentTypeString.c_str());
}
for (std::string &h : extraHeaders)
header = curl_slist_append(header, h.c_str());
curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
curl_easy_setopt(curl.get(), CURLOPT_HTTPHEADER,
header);