-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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