christophd commented on PR #1638:
URL: https://github.com/apache/camel-kamelets/pull/1638#issuecomment-1721705386

   Webhook called with `http://localhost:8080/bookings?name=foo&amount=100`
   result in Json `{"name": "foo", "amount": "100"}` on Kafka sink
   
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: KameletBinding
   metadata:
     name: webhook-source-booking-pipe
   spec:
     source:
       ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1
         name: webhook-source
       properties:
         subpath: bookings
       dataTypes:
         out:
           format: application-x-struct
     steps:
       - ref:
           kind: Kamelet
           apiVersion: camel.apache.org/v1
           name: insert-field-action
         properties:
           field: fruit
           value: ${header[name]}
       - ref:
           kind: Kamelet
           apiVersion: camel.apache.org/v1
           name: insert-field-action
         properties:
           field: amount
           value: ${header[amount]}
     sink:
       ref:
         kind: KafkaTopic
         apiVersion: kafka.strimzi.io/v1beta2
         name: bookings
       properties:
         brokers: localhost:9092
       dataTypes:
         in:
           format: plain-text
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to