Files
bookhoard/bruno/websocket_connect.bru
T
john-okeefe b49ba7909f 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.
2026-01-30 21:48:38 -05:00

31 lines
482 B
Plaintext

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")
}