martinzink commented on code in PR #1383: URL: https://github.com/apache/nifi-minifi-cpp/pull/1383#discussion_r952696192
########## extensions/http-curl/client/HTTPClient.cpp: ########## @@ -32,62 +31,53 @@ #include "range/v3/algorithm/all_of.hpp" #include "range/v3/action/transform.hpp" -namespace org::apache::nifi::minifi::utils { +using namespace std::literals::chrono_literals; + +namespace org::apache::nifi::minifi::extensions::curl { -HTTPClient::HTTPClient(std::string url, const std::shared_ptr<minifi::controllers::SSLContextService> ssl_context_service) +HTTPClient::HTTPClient(std::string url, std::shared_ptr<minifi::controllers::SSLContextService> ssl_context_service) : core::Connectable("HTTPClient"), - ssl_context_service_(ssl_context_service), + ssl_context_service_(std::move(ssl_context_service)), url_(std::move(url)) { - http_session_ = curl_easy_init(); + http_session_.reset(curl_easy_init()); } HTTPClient::HTTPClient(const std::string& name, const utils::Identifier& uuid) : core::Connectable(name, uuid) { - http_session_ = curl_easy_init(); + http_session_.reset(curl_easy_init()); } HTTPClient::HTTPClient() : core::Connectable("HTTPClient") { - http_session_ = curl_easy_init(); + http_session_.reset(curl_easy_init()); } -void HTTPClient::addFormPart(const std::string& content_type, const std::string& name, HTTPUploadCallback* read_callback, const std::optional<std::string>& filename) { +void HTTPClient::addFormPart(const std::string& content_type, const std::string& name, std::unique_ptr<utils::HTTPUploadCallback>&& form_callback, const std::optional<std::string>& filename) { Review Comment: makes sense, I fixed these in https://github.com/apache/nifi-minifi-cpp/pull/1383/commits/3edf5fcfd603463b67bd6c072fa0128bbb861787#diff-475912c726caf957fa46ce1b55d3e845e89aa19b4c7caf2cd4a0ae1f860cbdd5R98 -- 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. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org