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.
This commit is contained in:
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user