Open
Description
When we define the response headers in StructuredReturn, the whole CloudEvent is returned as response body instead of the CloudEvent's data.
curl -X POST -d '{"hello": "world"}' \
-H'Content-type: application/json' \
-H 'Ce-Id: asdadadsada' \
-H 'Ce-type: user-request' \
-H 'Ce-specversion: 1.0' \
-H 'Ce-correlationid: 123' \
-H 'Ce-mode: SYNC' \
-H 'Ce-Source: nodejs' \
http://localhost:8080
expected: {"hello":"world"}
actual: {"id":"asdadadsada","time":"2023-04-10T03:50:12.135Z","type":"user-request","source":"nodejs","specversion":"1.0","datacontenttype":"application/json","data":{"hello":"world"},"correlationid":"123","mode":"SYNC"}
Metadata
Metadata
Assignees
Labels
No labels