Skip to content

Commit 06dff6d

Browse files
committed
rename getters to drop proxy suffix
1 parent 98407f1 commit 06dff6d

File tree

6 files changed

+12
-13
lines changed

6 files changed

+12
-13
lines changed

libs/client-sdk/src/data_sources/streaming_data_source.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ void StreamingDataSource::Start() {
121121
client_builder.custom_ca_file(*ca_file);
122122
}
123123

124-
if (http_config_.Proxy().HttpProxy()) {
125-
client_builder.http_proxy(*http_config_.Proxy().HttpProxy());
124+
if (http_config_.Proxy().Http()) {
125+
client_builder.http_proxy(*http_config_.Proxy().Http());
126126
}
127127

128128
auto weak_self = weak_from_this();

libs/client-sdk/tests/client_config_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ TEST(ClientConfigBindings, ProxyOptions) {
291291

292292
auto client_config = reinterpret_cast<client_side::Config*>(config);
293293

294-
ASSERT_EQ(client_config->HttpProperties().Proxy().HttpProxy(),
294+
ASSERT_EQ(client_config->HttpProperties().Proxy().Http(),
295295
"http://proxy.com:8080");
296296

297297
LDClientConfig_Free(config);

libs/common/include/launchdarkly/config/shared/built/http_properties.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class ProxyOptions final {
2929
std::optional<std::string> https_proxy);
3030

3131
ProxyOptions() = default;
32-
[[nodiscard]] std::optional<std::string> HttpProxy() const;
33-
[[nodiscard]] std::optional<std::string> HttpsProxy() const;
32+
[[nodiscard]] std::optional<std::string> Http() const;
33+
[[nodiscard]] std::optional<std::string> Https() const;
3434

3535
private:
3636
std::optional<std::string> http_proxy_;

libs/common/src/config/http_properties.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ ProxyOptions::ProxyOptions(std::optional<std::string> http_proxy,
2626
: http_proxy_(std::move(http_proxy)),
2727
https_proxy_(std::move(https_proxy)) {}
2828

29-
std::optional<std::string> ProxyOptions::HttpProxy() const {
29+
std::optional<std::string> ProxyOptions::Http() const {
3030
return http_proxy_;
3131
}
3232

33-
std::optional<std::string> ProxyOptions::HttpsProxy() const {
33+
std::optional<std::string> ProxyOptions::Https() const {
3434
return https_proxy_;
3535
}
3636

@@ -91,8 +91,7 @@ bool operator==(TlsOptions const& lhs, TlsOptions const& rhs) {
9191
}
9292

9393
bool operator==(ProxyOptions const& lhs, ProxyOptions const& rhs) {
94-
return lhs.HttpProxy() == rhs.HttpProxy() &&
95-
lhs.HttpsProxy() == rhs.HttpsProxy();
94+
return lhs.Http() == rhs.Http() && lhs.Https() == rhs.Https();
9695
}
9796

9897
} // namespace launchdarkly::config::shared::built

libs/common/src/config/http_properties_builder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ ProxyBuilder<SDK>::ProxyBuilder() : ProxyBuilder(Defaults<SDK>::NoProxy()) {}
4242

4343
template <typename SDK>
4444
ProxyBuilder<SDK>::ProxyBuilder(built::ProxyOptions const& proxy) {
45-
http_proxy_ = proxy.HttpProxy();
46-
https_proxy_ = proxy.HttpsProxy();
45+
http_proxy_ = proxy.Http();
46+
https_proxy_ = proxy.Https();
4747
}
4848

4949
static std::optional<std::string> StringFromEnv(char const* env) {

libs/internal/src/network/http_requester.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ HttpRequest::HttpRequest(std::string const& url,
121121
port_ = uri_components->port();
122122
}
123123

124-
if (properties_.Proxy().HttpProxy()) {
125-
auto const http_proxy = properties_.Proxy().HttpProxy().value();
124+
if (properties_.Proxy().Http()) {
125+
auto const http_proxy = properties_.Proxy().Http().value();
126126
auto http_proxy_uri_components = boost::urls::parse_uri(http_proxy);
127127
if (!http_proxy_uri_components) {
128128
valid_ = false;

0 commit comments

Comments
 (0)