Support Questions

Find answers, ask questions, and share your expertise

how to write InvokeHttp form post repsone to remote sft server?

avatar
Contributor

Hello sir,

I am using invokedHttp to post request. But it did not get response from invokeHttp. I get request file . But I want to get the response invokeHttp and write to remote server. Here is the diagram

enam_0-1708004412154.jpeg

here is invokeHttp properties.

enam_2-1708004520698.jpeg

Request has been posted to server successfully.

How to get response from invokeHttp and write in remote server?

Please help me

1 ACCEPTED SOLUTION

avatar
Super Guru

Hi @enam ,

First thing I would check is if you are using the Response relationship. I cant figure that out from the first screenshot but all I can see is the : Failure, No Retry, Original...

Are you capturing the Response relationship? Also have you looked at this old post from you around the multipart form http invokation:

https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-processor-InvokeHTTP-POST-with-Multi...

Hope that helps.

 

View solution in original post

3 REPLIES 3

avatar
Super Guru

Hi @enam ,

First thing I would check is if you are using the Response relationship. I cant figure that out from the first screenshot but all I can see is the : Failure, No Retry, Original...

Are you capturing the Response relationship? Also have you looked at this old post from you around the multipart form http invokation:

https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-processor-InvokeHTTP-POST-with-Multi...

Hope that helps.

 

avatar
Contributor

Hi SAMSAL,

Thanks for reply. I have followed below which is working now....

enam_0-1708321693192.jpeg

 

 

 

avatar
Super Guru

Hi,

The processor sure changed in 2.0 from before , so few things I will check :

- Make sure the Request Bondy Enabled is set to true

- Make sure the Request Content-Type is set to : multipart/form-data

- Make sure to set the Request Multipart Form-Data Name to: file

- Once you set the property above, the property Request Multipart Form-Data Filename Enabled becomes visible , make sure it sets to true and it will use the filename attribute in the Content-Disposition header.

- Make sure to set the  Response Generation Required property to: true (default false)

- Finally, I dont think you need the Content-Disposition dynamic property since its already been set through the above properties.

I honestly dont like how in 2.0 there is a lot of visibility dependency with some of the properties where their visibility depends on setting the value of others. It makes it confusing specially when you read the documentation and struggle to find all the mentioned properties until you set the right values. I would rather if its all showing  or at least less visibility dependency on some of them. 

Let me know if that works for you or not. If it does, please accept solution.

Thanks