http-connector-for-apache-kafka
http-connector-for-apache-kafka copied to clipboard
Sending request headers
We have a use case where it is required to set certain request headers, based on a key or value from Kafka.
Would it be possible to add this feature? I can see several ways to do it.
- Automatically use fields in the record key as headers. This may make sense but it is prone to sending unnecessary headers.
- Specify a certain prefix for headers in the record key, e.g.
http_header_*. When a field matches this pattern, send it as a request header, removing thehttp_header_prefix. - Instead of sending the value as a request body, use nested fields
"headers"and"body"to describe the payload.
Hi @Oduig Thank you. Such functionality makes sense. I've added it to our backlog and we'll think how to best implement it.