Set some extra curl options

This commit is contained in:
blankie 2023-11-22 21:54:56 +11:00
parent 72e65dfe03
commit f16f03059c
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 4 additions and 1 deletions

View File

@ -89,8 +89,11 @@ CURL* MastodonClient::_get_easy() {
} }
try { try {
setopt(curl, CURLOPT_SHARE, this->_share);
setopt(curl, CURLOPT_FAILONERROR, 1L); setopt(curl, CURLOPT_FAILONERROR, 1L);
setopt(curl, CURLOPT_TIMEOUT_MS, 5000L);
setopt(curl, CURLOPT_PROTOCOLS_STR, "https");
setopt(curl, CURLOPT_USERAGENT, "Coyote (https://gitlab.com/blankX/coyote; blankie@nixnetmail.com)");
setopt(curl, CURLOPT_SHARE, this->_share);
} catch (const std::exception& e) { } catch (const std::exception& e) {
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
throw; throw;