#include <CurlHandleManager.h>
Definition at line 34 of file CurlHandleManager.h.
◆ Handle() [1/2]
audacity::network_manager::CurlHandleManager::Handle::Handle |
( |
CurlHandleManager * |
owner, |
|
|
CURL * |
handle, |
|
|
RequestVerb |
verb, |
|
|
std::string |
url |
|
) |
| |
|
privatenoexcept |
Definition at line 87 of file CurlHandleManager.cpp.
91 mUrl (std::move (url)),
93{
96
98
99 switch (verb)
100 {
103 break;
105
106
107
108 break;
111 break;
114 break;
116 setOption (CURLOPT_CUSTOMREQUEST,
"DELETE");
117 break;
120 setOption(CURLOPT_CUSTOMREQUEST,
"PATCH");
121 break;
122 }
123
125
128 else
130
132}
void enableSSLValidation()
void disableSSLValidation()
CURLcode setOption(CURLoption option, Args... value) noexcept
CurlHandleManager * mOwner
static CurlConfig gCurlConfig
References audacity::network_manager::Delete, audacity::network_manager::anonymous_namespace{CurlHandleManager.cpp}::gCurlConfig, audacity::network_manager::Get, audacity::network_manager::Head, audacity::network_manager::Patch, audacity::network_manager::Post, audacity::network_manager::Put, and audacity::network_manager::anonymous_namespace{CurlHandleManager.cpp}::CurlConfig::SSLValidation.
◆ Handle() [2/2]
audacity::network_manager::CurlHandleManager::Handle::Handle |
( |
Handle && |
rhs | ) |
|
|
noexcept |
◆ ~Handle()
audacity::network_manager::CurlHandleManager::Handle::~Handle |
( |
| ) |
|
|
noexcept |
◆ appendCookie()
CURLcode audacity::network_manager::CurlHandleManager::Handle::appendCookie |
( |
const Cookie & |
cookie | ) |
|
|
noexcept |
◆ appendCookies()
CURLcode audacity::network_manager::CurlHandleManager::Handle::appendCookies |
( |
const CookiesList & |
cookie | ) |
|
|
noexcept |
◆ appendHeader()
void audacity::network_manager::CurlHandleManager::Handle::appendHeader |
( |
const Header & |
header | ) |
|
◆ appendHeaders()
void audacity::network_manager::CurlHandleManager::Handle::appendHeaders |
( |
const HeadersList & |
headers | ) |
|
◆ disableSSLValidation()
void audacity::network_manager::CurlHandleManager::Handle::disableSSLValidation |
( |
| ) |
|
◆ enableSSLValidation()
void audacity::network_manager::CurlHandleManager::Handle::enableSSLValidation |
( |
| ) |
|
◆ getCurlHandle()
CURL * audacity::network_manager::CurlHandleManager::Handle::getCurlHandle |
( |
| ) |
const |
|
noexcept |
◆ getHTTPCode()
unsigned audacity::network_manager::CurlHandleManager::Handle::getHTTPCode |
( |
| ) |
const |
|
noexcept |
◆ isHandleFromCache()
bool audacity::network_manager::CurlHandleManager::Handle::isHandleFromCache |
( |
| ) |
const |
|
noexcept |
◆ markKeepAlive()
void audacity::network_manager::CurlHandleManager::Handle::markKeepAlive |
( |
| ) |
|
◆ operator=()
◆ perform()
Definition at line 200 of file CurlHandleManager.cpp.
201{
204
206
207 if (result != CURLE_OK)
208 return { result, std::string () };
209
210 char currentError[CURL_ERROR_SIZE] = {};
211 setOption(CURLOPT_ERRORBUFFER, currentError);
212
213 result = curl_easy_perform (
mHandle);
214
216
217 return { result, std::string (currentError) };
218}
std::string getUserAgent() const
curl_slist * getCurlList() const noexcept
Referenced by audacity::network_manager::CurlResponse::perform().
◆ reset()
void audacity::network_manager::CurlHandleManager::Handle::reset |
( |
| ) |
|
|
noexcept |
◆ setOption() [1/2]
template<typename... Args>
CURLcode audacity::network_manager::CurlHandleManager::Handle::setOption |
( |
CURLoption |
option, |
|
|
Args... |
value |
|
) |
| |
|
inlinenoexcept |
◆ setOption() [2/2]
CURLcode audacity::network_manager::CurlHandleManager::Handle::setOption |
( |
CURLoption |
option, |
|
|
const std::string & |
value |
|
) |
| |
|
noexcept |
◆ CurlHandleManager
◆ mHandle
CURL* audacity::network_manager::CurlHandleManager::Handle::mHandle { nullptr } |
|
private |
◆ mHandleFromCache
bool audacity::network_manager::CurlHandleManager::Handle::mHandleFromCache { false } |
|
private |
◆ mHeaders
CurlStringList audacity::network_manager::CurlHandleManager::Handle::mHeaders |
|
private |
◆ mOwner
CurlHandleManager* audacity::network_manager::CurlHandleManager::Handle::mOwner { nullptr } |
|
private |
◆ mReuse
bool audacity::network_manager::CurlHandleManager::Handle::mReuse { false } |
|
private |
◆ mUrl
std::string audacity::network_manager::CurlHandleManager::Handle::mUrl |
|
private |
◆ mUserAgentSet
bool audacity::network_manager::CurlHandleManager::Handle::mUserAgentSet { false } |
|
private |
◆ mVerb
RequestVerb audacity::network_manager::CurlHandleManager::Handle::mVerb |
|
private |
The documentation for this class was generated from the following files: