4 Commits

Author SHA1 Message Date
Eva Balycheva
bd86d38a76 Make websocket.html process notifications
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
2016-01-07 17:41:00 +03:00
Thomas Herve
02207d8e78 Support signed URLs in WebSocket
Change-Id: Iab0b719f00fdcf4c84740d06a7d774cac410181c
2015-08-26 09:40:21 +02:00
Thomas Herve
4d9b3c9141 Fix WS deauthenticate
Properly handle timezones in the WebSocket deauthenticate call. It also
updates the example to handle auth, and pass the proper action in
results.

Change-Id: I7b3b38764e6d275f9c2b29c8a09a6a947bf9bebf
2015-08-17 17:07:15 +02:00
Thomas Herve
7b2e346964 Add a websocket example
Add a page showing sample actions using websocket against Zaqar.

Change-Id: I61b45a9a2399e748b2c5942f58488e1ec5d0e32f
2015-08-06 10:26:55 +02:00