Skip to main content
PepeClaro
Gold ⭐️
September 30, 2022
Solved

Dont Work HttpInvoke: Put Responose Body in Attribute

Hi people
I am working with HttpInvoke processor with Post and I try to catch the response body using the propertie "Put Response Body in attribute", the processor execute well and it generate the response on the queue Response but it dosent generate the attribute. Someone has some idea where is my error?

stanere
stanereAnswer
Gold ⭐️
October 4, 2022

ResultInvoke in this case doesn't have any value, it's sent as a header with '${invokehttp.status.code}' as a value in http request.

 

To assign status code to ResultInvoke use UpdateAttribute after the InvokeHTTP.

3 replies

MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
September 30, 2022

@PepeClaro Can you share your processor configuration and NiFi version being used?

 

Thanks,

Matt

Translate
PepeClaro
PepeClaroAuthor
Gold ⭐️
October 3, 2022

Hi MattWho

I send the image of my configuration.
You can see on the final of my configuration that I am trying to use to new atrribute and to assing it the value ${invokehttp.status.code} but it dosent work too.
My version NiFi is 1.16.3

PepeClaro_0-1664807473116.pngPepeClaro_1-1664807502698.pngPepeClaro_2-1664807541125.pngPepeClaro_3-1664807569839.png

 

Translate
stanere
stanereAnswer
Gold ⭐️
October 4, 2022

ResultInvoke in this case doesn't have any value, it's sent as a header with '${invokehttp.status.code}' as a value in http request.

 

To assign status code to ResultInvoke use UpdateAttribute after the InvokeHTTP.

Translate