refactor
This commit is contained in:
@@ -211,7 +211,7 @@ public:
|
|||||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list);
|
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_shared::set_cache(curl);
|
curl_shared::set_share(curl);
|
||||||
|
|
||||||
auto url = construct_url(curl, request.get_path(), cfg) + parameters;
|
auto url = construct_url(curl, request.get_path(), cfg) + parameters;
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||||
|
@@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] static auto init() -> bool;
|
[[nodiscard]] static auto init() -> bool;
|
||||||
|
|
||||||
static void set_cache(CURL *curl);
|
static void set_share(CURL *curl);
|
||||||
};
|
};
|
||||||
} // namespace repertory
|
} // namespace repertory
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ void curl_shared::lock_callback(CURL * /* curl */, curl_lock_data data,
|
|||||||
mtx_.lock();
|
mtx_.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void curl_shared::set_cache(CURL *curl) {
|
void curl_shared::set_share(CURL *curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_SHARE, cache_.get());
|
curl_easy_setopt(curl, CURLOPT_SHARE, cache_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user