Repository navigation
examples: add a WebSocket example - #218
Merged
Merged
Conversation
lance
requested review from
danbev,
grant and
helio-frota
and removed request for
a team
June 10, 2020 19:28
lance
force-pushed
the
156-websocket-example
branch
from
June 10, 2020 19:29
4d52c24 to
87b38f5
Compare
grant
approved these changes
Jun 10, 2020
Member
|
THIS IS AWESOME |
Contributor
|
LGTM |
lholmquist
reviewed
Jun 10, 2020
| @@ -0,0 +1,14 @@ | |||
| <!DOCTYPE html> | |||
Contributor
There was a problem hiding this comment.
I know there is an issue related to this sdk being available in the browser, but maybe that can be another commit since it doesn't have to do with the websocket example?
Member
Author
There was a problem hiding this comment.
@lholmquist I'm actually thinking of modifying this example so that the client just sends a zip code to the server, which responds with a weather event. And I'll add an index.html to this example and have it also connect to the web socket. :)
helio-frota
approved these changes
Jun 10, 2020
There is nothing really to do in order to support events over websockets. Since a `CloudEvent` can easily be represented in full with JSON, it can be sent over a websocket as `event.toString()`. Fixes: cloudevents#156 Signed-off-by: Lance Ball <lball@redhat.com>
lance
force-pushed
the
156-websocket-example
branch
from
June 10, 2020 21:32
5bdc1af to
843a564
Compare
Member
Author
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is nothing really to do in order to support events over websockets.
Since a
CloudEventcan easily be represented in full with JSON, it canbe sent over a websocket as
event.toString().Fixes: #156