Thank you so much, Kevin!!

With that I could solve it in a minute!
The issue was that InvokeHTTP was sending a "user-agent" header with an empty 
value and that caused the endpoint to issue and error message.
By setting the "useragent" parameter of InvokeHTTP to a random non-null value 
(i.e. "none"), the endpoint responded instead with the expected answer.

Thanks again,

Luca


Luca Giovannini
Information Systems Analyst
Dedagroup Public Services
www.linkedin.com/in/lucagio/<http://www.linkedin.com/in/lucagio/>
T +39.051.278.928 | M +39.347.799.3183 | VoIP 951.128
Dedagroup Public Services Srl - Sede di Casalecchio di Reno, Via del Lavoro 67
www.dedagroup.it/public-services<http://www.dedagroup.it/public-services>

[cid:image001.jpg@01D83EBD.FA0D3420]<http://www.dedagroup.it/home>

Da: Kevin Doran <kdo...@apache.org>
Inviato: mercoledì 2 marzo 2022 16:39
A: users@nifi.apache.org
Oggetto: Re: How to see the request header created by InvokeHTTP?

**ATTENZIONE** Questo messaggio proviene da un ACCOUNT ESTERNO, presta 
attenzione ad eventuali link o allegati al suo interno.

Hi Luca,

Based on looking at the code here [1], I believe you need to enable debug-level 
logging for this logger:

org.apache.nifi.processors.standard.InvokeHTTP

Instructions for changing log level for individual component loggers can be 
found here [2]. (Ignore the part about attaching a remote debugger if you are 
just interested in the logging part.)
Basically, you need to add this line to your NiFi conf/logback.xml file:

<logger name="org.apache.nifi.processors.standard.InvokeHTTP" level="DEBUG"/>

[1] 
https://github.com/apache/nifi/blob/4cc20e6c0687277394f021ca1f3ececd430c5a0e/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java#L1277<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fnifi%2Fblob%2F4cc20e6c0687277394f021ca1f3ececd430c5a0e%2Fnifi-nar-bundles%2Fnifi-standard-bundle%2Fnifi-standard-processors%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fnifi%2Fprocessors%2Fstandard%2FInvokeHTTP.java%23L1277&data=04%7C01%7CLuca.Giovannini%40dedagroup.it%7Ce1a122e0f71b45a1c49908d9fc62c06d%7Cbbf156d433fa4fee86f62cfcb1359ef0%7C0%7C0%7C637818323354462607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hWA12fczMaiCmi7xXiYQI1oyYzrz2SCcX8Rv%2Bj7iQbw%3D&reserved=0>
[2] 
https://community.cloudera.com/t5/Community-Articles/NiFi-Debugging-Tutorial/ta-p/246082<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.cloudera.com%2Ft5%2FCommunity-Articles%2FNiFi-Debugging-Tutorial%2Fta-p%2F246082&data=04%7C01%7CLuca.Giovannini%40dedagroup.it%7Ce1a122e0f71b45a1c49908d9fc62c06d%7Cbbf156d433fa4fee86f62cfcb1359ef0%7C0%7C0%7C637818323354462607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mOI4b0IRYfbrfuYVtbMVQNkl%2BgVhOvodiie5zNL7mss%3D&reserved=0>

Hope this helps!
Kevin
On Mar 2, 2022 at 04:26:10, Luca Giovannini 
<luca.giovann...@dedagroup.it<mailto:luca.giovann...@dedagroup.it>> wrote:

Dear All,

I am having troubles replicating with InvokeHTTP (1.12.1) a call to an HTTP 
endpoint that I am successfully able to make with Postman.
I use InvokeHTTP with its default values and I just add two attributes for 
'Authorization' and 'Host'.

I would like to see the actual request header created by InvokeHTTP, so that I 
can compare it with the one created by Postman and try to have some insights on 
my problem from the comparison...
So, how can I access the request header created by InvokeHTTP?
I had a look in the nifi-app log but no detail on the call was provided.

Thank you for your help!

Luca


Luca Giovannini
Information Systems Analyst
Dedagroup Public Services
www.linkedin.com/in/lucagio/<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Flucagio%2F&data=04%7C01%7CLuca.Giovannini%40dedagroup.it%7Ce1a122e0f71b45a1c49908d9fc62c06d%7Cbbf156d433fa4fee86f62cfcb1359ef0%7C0%7C0%7C637818323354462607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OlfQuGLwbYUy97U6%2F8%2BPdbmiq1tIKQwbNmgg4DjWnz8%3D&reserved=0>
T +39.051.278.928 | M +39.347.799.3183 | VoIP 951.128
Dedagroup Public Services Srl - Sede di Casalecchio di Reno, Via del Lavoro 67
www.dedagroup.it/public-services<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dedagroup.it%2Fpublic-services&data=04%7C01%7CLuca.Giovannini%40dedagroup.it%7Ce1a122e0f71b45a1c49908d9fc62c06d%7Cbbf156d433fa4fee86f62cfcb1359ef0%7C0%7C0%7C637818323354462607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xFLpV%2Bm7C6qrPcY5Nzs9lUM%2BCZdVxFhM%2FR4s4fuMDs0%3D&reserved=0>

[cid:image001.jpg@01D83EBD.FA0D3420]<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dedagroup.it%2Fhome&data=04%7C01%7CLuca.Giovannini%40dedagroup.it%7Ce1a122e0f71b45a1c49908d9fc62c06d%7Cbbf156d433fa4fee86f62cfcb1359ef0%7C0%7C0%7C637818323354462607%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=hYXlhuznohQlAqEz8qlbispm3oij6p6vuz5G2uHqfaY%3D&reserved=0>

Le informazioni contenute in questo messaggio di posta elettronica sono 
riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o 
forma. Qualora Lei non fosse la persona destinataria del presente messaggio, La 
invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazione 
al mittente.

The information included in this e-mail and any attachments are confidential 
and may also be privileged. If you are not the correct recipient, you are 
kindly requested to notify the sender immediately, to cancel it and not to 
disclose the contents to any other person.

Reply via email to