Use CURLOPT_USERAGENT instead of manually setting User-Agent

This commit is contained in:
Exzap 2024-05-22 05:08:03 +02:00
parent a059338890
commit b048a1fd9e

View file

@ -388,9 +388,8 @@ bool CurlSOAPHelper::submitRequest()
headers = curl_slist_append(headers, "Accept-Charset: UTF-8");
headers = curl_slist_append(headers, fmt::format("SOAPAction: urn:{}.wsapi.broadon.com/{}", m_serviceType, m_requestMethod).c_str());
headers = curl_slist_append(headers, "Accept: */*");
headers = curl_slist_append(headers, "User-Agent: EVL NUP 040800 Sep 18 2012 20:20:02");
curl_easy_setopt(m_curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, "EVL NUP 040800 Sep 18 2012 20:20:02");
// send request
auto res = curl_easy_perform(m_curl);