Establishing a secure WebSocket connection through a web browser

Prerequisites
  • 访问开关必须enabl REST APIed. The REST API access mode can be either read-only or read/write.

  • The web browser you use must support the secure WebSocket Protocol.

Procedure
  1. Open a web browser page and log in to the switch Web UI or the REST API.

    The session cookie is managed by the browser and is shared among browser tabs.

  2. From a different tab in the same browser, open the page that contains the WebSocket interface.

    For example, many browsers have a plugin for secure WebSocket connections.

  3. Connect to the switch at the following URL:
    wss:///休息/v1/notification

    is the IP address of the switch.

    For example:

    wss://192.0.2.5/休息/v1/notification

After the connection is established, you can use the interface to send subscribe or unsubscribe messages and to view the responses and notification messages.