diff --git a/src/http.cpp b/src/http.cpp index 7e006dc..9648e0a 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -76,11 +76,11 @@ API::http::http(const API &api, const string &instance, { string hostport = env_proxy.substr(pos + 1); string userpw = env_proxy.substr(0, pos); - parent.set_proxy(hostport, userpw); + set_proxy(hostport, userpw); } else { - parent.set_proxy(env_proxy); + set_proxy(env_proxy); } } catch (const std::exception &) diff --git a/src/mastodon-cpp.hpp b/src/mastodon-cpp.hpp index 58c7b8a..6e06235 100644 --- a/src/mastodon-cpp.hpp +++ b/src/mastodon-cpp.hpp @@ -146,11 +146,11 @@ namespace Mastodon * @brief Set proxy. Do not call this directly. * * @param hostport host[:port] - * @param userpw user[:password] + * @param userpw user[:password] (optional) * * @since 0.110.0 */ - void set_proxy(const string &hostport, const string &userpw); + void set_proxy(const string &hostport, const string &userpw = ""); private: const API &parent;