bd86d38a76
Currently Websocket html client example can only process responses from Zaqar. It can't handle notifications from Zaqar. When notification is received by Websocket html client example (examples/websocket.html), javascript console throws an Exception: TypeError: data.request is undefined That's because Websocket html client example always expects received payload('data' object) to have 'request', 'headers' and 'body' properties. All these properties exist in payload only when response from Zaqar is received. But when notification is received, 'data' object do not have 'request' and 'headers' properties. This patch makes Websocket html client example able to process notifications from Zaqar by examining 'data' object's properties and, if notification is detected, processing 'data' differently. Closes-Bug: 1531671 Change-Id: I3ea4d092f097d22784f21bf9c38657ff4e12c32d |
||
---|---|---|
.. | ||
websocket.html |