diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/connection.hpp | 7 | ||||
-rw-r--r-- | include/curl_wrapper.hpp | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/connection.hpp b/include/connection.hpp index fcb2a23..2469738 100644 --- a/include/connection.hpp +++ b/include/connection.hpp @@ -98,6 +98,13 @@ public: return get(endpoint, {}); } + /*! @copydoc CURLWrapper::set_proxy(string_view) + * + * Sets also the proxy for the Instance you used to initialize this + * Connection. + */ + void set_proxy(const string_view proxy); + private: Instance &_instance; const string_view _baseuri; diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp index ecc30e1..faf79a5 100644 --- a/include/curl_wrapper.hpp +++ b/include/curl_wrapper.hpp @@ -127,6 +127,18 @@ public: return _connection; } + /*! + * @brief Set the proxy to use. + * + * See [CURLOPT_PROXY(3)] + * (https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html). + * + * @param proxy Examples: "socks4a://127.0.0.1:9050", "http://[::1]:3128". + * + * @since 0.1.0 + */ + void set_proxy(const string_view proxy); + protected: /*! * @brief Make a HTTP request. |