Adding custom header (om_http)

Tags:

#1 piro314

Hi, According to this documentation https://nxlog.co/documentation/nxlog-user-guide#om_http I can use 'AddHeader' to put my custom headers to http request. However, when I put it in config i get: ERROR invalid keyword: AddHeader

I also tried

 Exec 				add_http_header('Application-Id', 'b1f8b7a0-5cc5-11e8-8230-0db3d3bfb10d');

This time error is: procedure 'add_http_header()' does not exist or takes different arguments.

What's the correct way to add a http header"?

#2 Zhengshi Nxlog ✓
#1 piro314
Hi, According to this documentation https://nxlog.co/documentation/nxlog-user-guide#om_http I can use 'AddHeader' to put my custom headers to http request. However, when I put it in config i get: ERROR invalid keyword: AddHeader I also tried Exec add_http_header('Application-Id', 'b1f8b7a0-5cc5-11e8-8230-0db3d3bfb10d'); This time error is: procedure 'add_http_header()' does not exist or takes different arguments. What's the correct way to add a http header"?

It sounds like you are using NXLog CE.
Here is the om_http section in the CE Manual.

The error message you are getting is due to this feature not existing in the CE version yet. If you are using EE, then you would need to upgrade to get the feature.