Dale,

That should work. I tried exactly that and go the result below.

Can you verify that your ListenHTTP processor is running and that it doesn't 
show any bulletins?
Have tried to telnet in? I.e., "telnet <hostname> 8011" to see if you can 
connect that way?

$ curl -i -X POST -H 'Content-Type: application/json' -d '{"test": "Hello, 
NiFi"}' http://localhost:8011/contentListener
HTTP/1.1 200 OK
Date: Tue, 14 Jun 2016 22:00:53 GMT
Content-Type: text/plain
Content-Length: 0
Server: Jetty(9.2.11.v20150529)

Thanks
-Mark


> On Jun 14, 2016, at 4:46 PM, dale.chang13 <[email protected]> wrote:
> 
> So I am having some woes with sending HTTP Post requests to my NiFi server by
> using curl to send a JSON object.
> I have a ListenHTTP Processor running that is configured as so:
> - BasePath = contentListener
> - ListeningPort = 8011
> - Authorized DN Pattern = .*
> - Max Unconfirmed FlowFile Time = 60 secs
> 
> And I am trying to send a JSON object via curl:
> curl -i -X POST -H 'Content-Type: application/json' -d '{"test":"Hello,
> NiFi"}' http://[hostname for NiFi]:8011/contentListener
> 
> And I feel like this needs to be sent elsewhere, but I am thinking that the
> internal HTTP Server that ListenHTTP creates because I get /curl: (7)
> couldn't connect to host/. This usually arises as a result of the server
> receiving the HTTP request being down, firewall (have none at the moment),
> and other server errors.
> 
> I have been able to successfully use the Rest API to modify Processors,
> Processor Groups, etc through curl. Is there something I am missing?
> 
> 
> 
> --
> View this message in context: 
> http://apache-nifi-developer-list.39713.n7.nabble.com/ListenHTTP-Questions-tp11441.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Reply via email to