You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Richard Catlin <ri...@gmail.com> on 2016/01/19 19:37:48 UTC

Trying to send a PostHTTP with a "non-chunked" payload.

I am trying to create a POST in Nifi, which carries a standard non-chunked payload.
Here is a POST request that works:

POST / HTTP/1.1

Host: 127.0.0.1:8085

User-Agent: curl/7.43.0

Accept: */*

Content-Length: 60

Content-Type: application/x-www-form-urlencoded

client_id=test_id&secret=test_secret∾cess_token=test_wells

Here is the POST request created in Nifi using PostHTTP. The setting are "Send as FlowFile" is false; "Use chunked encoding" is false. Why does the POST below show chunked encoding to be enabled?

POST / HTTP/1.1

Content-Type: application/x-www-form-urlencoded

x-prefer-acknowledge-uri: true

x-nifi-transfer-protocol-version: 3

x-nifi-transaction-id: 22297370-a69e-4210-b872-f010c2046c50

Transfer-Encoding: chunked

Host: 127.0.0.1:8085

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_79)

3c

client_id=test_id&secret=test_secret∾cess_token=test_wells

Re: Trying to send a PostHTTP with a "non-chunked" payload.

Posted by Joe Percivall <jo...@yahoo.com>.
Hello Richard,
This is actually came up a couple days ago and is a known bug [1]. In another ticket[2] I added the option to InvokeHttp expose the option and my patch is pending. [1] https://issues.apache.org/jira/browse/NIFI-1396[2] https://issues.apache.org/jira/browse/NIFI-1405
Joe- - - - - - Joseph Percivalllinkedin.com/in/Percivalle: joepercivall@yahoo.com
 

    On Tuesday, January 19, 2016 1:37 PM, Richard Catlin <ri...@gmail.com> wrote:
 

 
I am trying to create a POST in Nifi, which carries a standard non-chunked payload.
Here is a POST request that works:POST / HTTP/1.1Host: 127.0.0.1:8085User-Agent: curl/7.43.0Accept: */*Content-Length: 60Content-Type: application/x-www-form-urlencodedclient_id=test_id&secret=test_secret∾cess_token=test_wellsHere is the POST request created in Nifi using PostHTTP. The setting are "Send as FlowFile" is false; "Use chunked encoding" is false. Why does the POST below show chunked encoding to be enabled?POST / HTTP/1.1Content-Type: application/x-www-form-urlencodedx-prefer-acknowledge-uri: truex-nifi-transfer-protocol-version: 3x-nifi-transaction-id: 22297370-a69e-4210-b872-f010c2046c50Transfer-Encoding: chunkedHost: 127.0.0.1:8085Connection: Keep-AliveUser-Agent: Apache-HttpClient/4.4.1 (Java/1.7.0_79)3cclient_id=test_id&secret=test_secret∾cess_token=test_wells