Closed
Description
When an extension attribute contains a boolean false value, it does not appear in the binary mode HTTP headers.
Steps to Reproduce
const { CloudEvent, HTTP } = require("cloudevents")
const ce = new CloudEvent({ type: 'test', source:'testor', exttrue: true, extfalse: false, extstring: 'false' })
const { headers } = HTTP.binary(ce)
console.log(headers)
// Prints:
// {
// 'content-type': 'application/json; charset=utf-8',
// 'ce-id': '1dcf7357-3896-42d8-afb6-21162d88d550',
// 'ce-time': '2022-06-02T16:07:03.729Z',
// 'ce-type': 'test',
// 'ce-source': 'testor',
// 'ce-specversion': '1.0',
// 'ce-exttrue': true,
// 'ce-extstring': 'false'
// }
Expected Behavior
Headers should include expected ce-extfalse: false
.
Metadata
Metadata
Assignees
Labels
No labels