http-connector-for-apache-kafka icon indicating copy to clipboard operation
http-connector-for-apache-kafka copied to clipboard

Sending request headers

Open Oduig opened this issue 4 years ago • 1 comments

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.

  1. Automatically use fields in the record key as headers. This may make sense but it is prone to sending unnecessary headers.
  2. 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 the http_header_ prefix.
  3. Instead of sending the value as a request body, use nested fields "headers" and "body" to describe the payload.

Oduig avatar Aug 19 '21 07:08 Oduig

Hi @Oduig Thank you. Such functionality makes sense. I've added it to our backlog and we'll think how to best implement it.

ivanyu avatar Sep 23 '21 12:09 ivanyu