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

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_r112986328
  
    --- Diff: libminifi/src/processors/InvokeHTTP.cpp ---
    @@ -0,0 +1,537 @@
    +/**
    + *
    + * 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 "processors/InvokeHTTP.h"
    +
    +#include <curl/curlbuild.h>
    +#include <curl/easy.h>
    +#include <sys/_types/_size_t.h>
    +#include <sys/_types/_uuid_t.h>
    +#include <uuid/uuid.h>
    +#include <memory>
    +#include <algorithm>
    +#include <cctype>
    +#include <cstdint>
    +#include <cstring>
    +#include <iostream>
    +#include <iterator>
    +#include <map>
    +#include <set>
    +#include <string>
    +#include <utility>
    +#include <vector>
    +
    +#include "core/FlowFile.h"
    +#include "core/logging/Logger.h"
    +#include "core/ProcessContext.h"
    +#include "core/Relationship.h"
    +#include "io/DataStream.h"
    +#include "io/StreamFactory.h"
    +#include "ResourceClaim.h"
    +#include "utils/StringUtils.h"
    +
    +#if  (__GNUC__ >= 4)
    +#if (__GNUC_MINOR__ < 9)
    +#include <regex.h>
    +#endif
    +#endif
    +
    +namespace org {
    +namespace apache {
    +namespace nifi {
    +namespace minifi {
    +namespace processors {
    +
    +const char *InvokeHTTP::ProcessorName = "InvokeHTTP";
    +
    +core::Property InvokeHTTP::Method(
    +    "HTTP Method",
    +    "HTTP request method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS). "
    +    "Arbitrary methods are also supported. Methods other than POST, PUT 
and PATCH will be sent without a message body.",
    +    "GET");
    +core::Property InvokeHTTP::URL(
    +    "Remote URL",
    +    "Remote URL which will be connected to, including scheme, host, port, 
path.",
    +    "");
    +core::Property InvokeHTTP::ConnectTimeout(
    +    "Connection Timeout", "Max wait time for connection to remote 
service.",
    +    "5 secs");
    +core::Property InvokeHTTP::ReadTimeout(
    +    "Read Timeout", "Max wait time for response from remote service.",
    +    "15 secs");
    +core::Property InvokeHTTP::DateHeader(
    +    "Include Date Header", "Include an RFC-2616 Date header in the 
request.",
    +    "True");
    +core::Property InvokeHTTP::FollowRedirects(
    +    "Follow Redirects", "Follow HTTP redirects issued by remote server.",
    +    "True");
    +core::Property InvokeHTTP::AttributesToSend(
    +    "Attributes to Send",
    +    "Regular expression that defines which attributes to send as HTTP"
    +    " headers in the request. If not defined, no attributes are sent as 
headers.",
    +    "");
    +core::Property InvokeHTTP::SSLContext(
    +    "SSL Context Service",
    +    "The SSL Context Service used to provide client certificate 
information for TLS/SSL (https) connections.",
    +    "");
    +core::Property InvokeHTTP::ProxyHost(
    +    "Proxy Host",
    +    "The fully qualified hostname or IP address of the proxy server", "");
    +core::Property InvokeHTTP::ProxyPort("Proxy Port",
    +                                     "The port of the proxy server", "");
    +core::Property InvokeHTTP::ProxyUser(
    +    "invokehttp-proxy-user",
    +    "Username to set when authenticating against proxy", "");
    +core::Property InvokeHTTP::ProxyPassword(
    +    "invokehttp-proxy-password",
    +    "Password to set when authenticating against proxy", "");
    +core::Property InvokeHTTP::ContentType(
    +    "Content-type",
    +    "The Content-Type to specify for when content is being transmitted 
through a PUT, "
    +    "POST or PATCH. In the case of an empty value after evaluating an 
expression language expression, "
    +    "Content-Type defaults to",
    +    "application/octet-stream");
    +core::Property InvokeHTTP::SendBody(
    +    "send-message-body",
    +    "If true, sends the HTTP message body on POST/PUT/PATCH requests 
(default).  "
    +    "If false, suppresses the message body and content-type header for 
these requests.",
    +    "true");
    +
    +core::Property InvokeHTTP::PropPutOutputAttributes(
    +    "Put Response Body in Attribute",
    +    "If set, the response body received back will be put into an attribute 
of the original "
    +    "FlowFile instead of a separate FlowFile. The attribute key to put to 
is determined by evaluating value of this property. ",
    +    "");
    +core::Property InvokeHTTP::AlwaysOutputResponse(
    +    "Always Output Response",
    +    "Will force a response FlowFile to be generated and routed to the 
'Response' relationship "
    +    "regardless of what the server status code received is ",
    +    "false");
    +core::Property InvokeHTTP::PenalizeOnNoRetry(
    +    "Penalize on \"No Retry\"",
    +    "Enabling this property will penalize FlowFiles that are routed to the 
\"No Retry\" relationship.",
    +    "false");
    +
    +const char* InvokeHTTP::STATUS_CODE = "invokehttp.status.code";
    +const char* InvokeHTTP::STATUS_MESSAGE = "invokehttp.status.message";
    +const char* InvokeHTTP::RESPONSE_BODY = "invokehttp.response.body";
    +const char* InvokeHTTP::REQUEST_URL = "invokehttp.requerst.url";
    --- End diff --
    
    typo here and in the referencing IT


> 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