adamdebreceni commented on a change in pull request #897:
URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484263666
##########
File path: extensions/http-curl/processors/InvokeHTTP.cpp
##########
@@ -246,6 +246,20 @@ void InvokeHTTP::onSchedule(const
std::shared_ptr<core::ProcessContext> &context
if (context->getProperty(DisablePeerVerification.getName(),
disablePeerVerification)) {
utils::StringUtils::StringToBool(disablePeerVerification,
disable_peer_verification_);
}
+
+ std::string proxy_value;
+ if (context->getProperty(ProxyHost.getName(), proxy_value) &&
!proxy_value.empty()) {
+ proxy_.host = proxy_value;
+ }
+ if (context->getProperty(ProxyPort.getName(), proxy_value) &&
!proxy_value.empty()) {
+ proxy_.port = std::stoi(proxy_value);
Review comment:
`getProperty` is a templated method, that depending on the second
argument's type carries out checks and conversions from `std::string`, so feel
free to pass `proxy.port` as the second argument here, moreover I believe
`getProperty` adheres to the contract "the out argument is not modified on
failure, missing value", so we don't even need the "if"s here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]