fgerlits commented on a change in pull request #1046:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1046#discussion_r610688414



##########
File path: libminifi/include/utils/HTTPClient.h
##########
@@ -362,10 +363,27 @@ class BaseHTTPClient {
   virtual inline bool matches(const std::string &value, const std::string 
&sregex) = 0;
 };
 
-extern std::string get_token(utils::BaseHTTPClient *client, std::string 
username, std::string password);
+std::string get_token(utils::BaseHTTPClient *client, std::string username, 
std::string password);
+
+class URL {
+ public:
+  explicit URL(const std::string& url_input);
+  bool isValid() const { return is_valid_; }
+  std::string protocol() const { return protocol_; }
+  std::string host() const { return host_; }
+  int port() const;
+  std::string hostPort() const;
+  std::string toString() const;
+
+ private:
+  std::string protocol_;
+  std::string host_;
+  utils::optional<int> port_;

Review comment:
       This is only used in one place, to create `RPG` structs which are stored 
in `RemoteProcessorGroupPort::nifi_instances_`, and `RPG` stores the port as an 
`int`.  We could change the `RPG` struct, but I didn't think it was necessary.  
It could be done in a separate PR.




-- 
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:
us...@infra.apache.org


Reply via email to