Repository navigation
chore: Update examples to use latest sdk changes - #282
Conversation
started the express example. 1 failure in the curl statement Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
|
I noticed something with the express example. The last curl statement for v03 fails with an "Invalid Payload" error. A Binary One with Base 64 Encoding curl -X POST \
-d'@../payload/data-1.txt' \
-H'Content-Type:application/json' \
-H'ce-specversion:0.3' \
-H'ce-type:com.github.pull.create' \
-H'ce-source:https://github.com/cloudevents/spec/pull/123' \
-H'ce-id:45c83279-c8a1-4db6-a703-b3768db93887' \
-H'ce-time:2019-06-21T17:31:00Z' \
-H'ce-datacontentencoding:base64' \
http://localhost:3000/If you remove that @lance thoughts? |
|
@lholmquist interesting... I've worked out what the problem is. See #284. I've got a fix, but need to add tests and check behavior with the structured receiver as well. |
The 0.3 specification states that `datacontentencoding` may be set to base64. If an incoming event arrives over HTTP with this value set, and the content type is either application/json or application/cloudevents+json, then ensure that the data is decoded and parsed. Fixes: cloudevents#284 See: cloudevents#282 Signed-off-by: Lance Ball <lball@redhat.com>
|
@lholmquist ok I have pushed a PR for a fix. I don't think that this deserves a quick version bump because it only affects encoded data on v0.3 events. |
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
The 0.3 specification states that `datacontentencoding` may be set to base64. If an incoming event arrives over HTTP with this value set, and the content type is either application/json or application/cloudevents+json, then ensure that the data is decoded and parsed. Fixes: #284 See: #282 Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lucas Holmquist lholmqui@redhat.com
Proposed Changes
All the examples work except one curl statement in the express example that is being addressed by #284 and since we are using the
~those changes will get picked up once a new patch version is released, automaticallyDescription