From b49ba7909ffd6923c2cb09bb29beb9bd4ceb73c0 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 30 Jan 2026 21:48:38 -0500 Subject: [PATCH] docs: add Bruno API request for WebSocket connection Add Bruno v3.0 request for testing WebSocket endpoint: - WebSocket connection type - JWT token authentication via query parameter - Ping message body for heartbeat testing - Assertions for successful WebSocket upgrade (101 status) Provides API documentation and testing capability for WebSocket connection functionality per project standards. --- bruno/websocket_connect.bru | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bruno/websocket_connect.bru diff --git a/bruno/websocket_connect.bru b/bruno/websocket_connect.bru new file mode 100644 index 0000000..8fbe31d --- /dev/null +++ b/bruno/websocket_connect.bru @@ -0,0 +1,30 @@ +meta { + name: "WebSocket - Connect and Receive Updates" + type: websocket + seq: 1 +} + +vars { + token: "" +} + +websocket { + url: "{{ baseUrl }}/ws/sync?token={{ token }}" + body: { + type: "ping", + timestamp: "2026-01-30T20:00:00Z" + } + auth: { + type: bearer + token: "{{ token }}" + } + headers: { + Authorization: "Bearer {{ token }}" + } +} + +assert { + res.status == 101 + res.headers.contains("Connection", "upgrade") + res.headers.contains("Upgrade", "websocket") +}