[ 
https://issues.apache.org/jira/browse/MINIFI-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981472#comment-15981472
 ] 

ASF GitHub Bot commented on MINIFI-239:
---------------------------------------

Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/80#discussion_r112986394
  
    --- Diff: libminifi/test/HttpGetIntegrationTest.cpp ---
    @@ -0,0 +1,118 @@
    +/**
    + *
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +#include <cassert>
    +#include <chrono>
    +#include <fstream>
    +#include <memory>
    +#include <string>
    +#include <thread>
    +#include <type_traits>
    +#include <vector>
    +#include <sys/stat.h>
    +#include "utils/StringUtils.h"
    +#include "../include/core/Core.h"
    +#include "../include/core/logging/LogAppenders.h"
    +#include "../include/core/logging/BaseLogger.h"
    +#include "../include/core/logging/Logger.h"
    +#include "../include/core/ProcessGroup.h"
    +#include "../include/core/yaml/YamlConfiguration.h"
    +#include "../include/FlowController.h"
    +#include "../include/properties/Configure.h"
    +#include "unit/ProvenanceTestHelper.h"
    +
    +std::string test_file_location;
    +
    +void waitToVerifyProcessor() {
    +  std::this_thread::sleep_for(std::chrono::seconds(2));
    +}
    +
    +int main(int argc, char **argv) {
    +
    +  if (argc > 1) {
    +    test_file_location = argv[1];
    +  }
    +  mkdir("content_repository", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
    +  std::ostringstream oss;
    +  std::unique_ptr<logging::BaseLogger> outputLogger = std::unique_ptr<
    +      logging::BaseLogger>(
    +      new 
org::apache::nifi::minifi::core::logging::OutputStreamAppender(oss,
    +                                                                         
0));
    +  std::shared_ptr<logging::Logger> logger = logging::Logger::getLogger();
    +  logger->updateLogger(std::move(outputLogger));
    +  logger->setLogLevel("debug");
    +
    +  minifi::Configure *configuration = minifi::Configure::getConfigure();
    +
    +  std::shared_ptr<core::Repository> test_repo =
    +      std::make_shared<TestRepository>();
    +  std::shared_ptr<core::Repository> test_flow_repo = std::make_shared<
    +      TestFlowRepository>();
    +
    +  configuration->set(minifi::Configure::nifi_flow_configuration_file,
    +                     test_file_location);
    +
    +  std::unique_ptr<core::FlowConfiguration> yaml_ptr = std::unique_ptr<
    +      core::YamlConfiguration>(
    +      new core::YamlConfiguration(test_repo, test_repo, 
test_file_location));
    +  std::shared_ptr<TestRepository> repo =
    +      std::static_pointer_cast<TestRepository>(test_repo);
    +
    +  std::shared_ptr<minifi::FlowController> controller = std::make_shared<
    +      minifi::FlowController>(test_repo, test_flow_repo, 
std::move(yaml_ptr),
    +  DEFAULT_ROOT_GROUP_NAME,
    +                              true);
    +
    +  core::YamlConfiguration yaml_config(test_repo, test_repo, 
test_file_location);
    +
    +  std::unique_ptr<core::ProcessGroup> ptr = yaml_config.getRoot(
    +      test_file_location);
    +  std::shared_ptr<core::ProcessGroup> pg = 
std::shared_ptr<core::ProcessGroup>(
    +      ptr.get());
    +  ptr.release();
    +
    +  controller->load();
    +  controller->start();
    +  waitToVerifyProcessor();
    +
    +  controller->waitUnload(60000);
    +  std::string logs = oss.str();
    +  assert(logs.find("key:filename value:") != std::string::npos);
    +  assert(
    +      logs.find(
    +          "key:invokehttp.requerst.url 
value:https://curl.haxx.se/libcurl/c/httpput.html";)
    --- End diff --
    
    typo


> Create a C++ HTTP client processor to match the InvokeHTTP processor
> --------------------------------------------------------------------
>
>                 Key: MINIFI-239
>                 URL: https://issues.apache.org/jira/browse/MINIFI-239
>             Project: Apache NiFi MiNiFi
>          Issue Type: Task
>          Components: C++, Extensions
>            Reporter: Andrew Grande
>            Assignee: marco polo
>
> There is a ListenHTTP processor, but nothing for the client side (e.g. to 
> invoke REST APIs). The civetweb library is already being used, can be 
> leveraged to implement the InvokeHTTP parity.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to