Repository navigation
Plainwire 0.12.0: WebSocket requests
- WebSocket requests, in the JetBrains HTTP Client format:
WEBSOCKET wss://host/path(also a barews:///wss://URL, or httpYac'sWSkeyword), headers for the handshake, then the messages. The first message is sent on connect;===separates messages;=== wait-for-serverwaits for one message from the server before the next is sent (repeat it to wait for more). A script that ends with=== wait-for-servercloses the connection (code 1000) once those replies arrived; otherwise it listens until the server closes, you press Stop,# @max-events Nmessages arrived, or the timeout (# @timeout,plainwire.timeoutMs). All of these keep what arrived. {{variables}}, environments, chained requests, OAuth 2 tokens and the cookie jar work for the handshake and every message. A message can be< ./file(sent as binary) or<@ ./file(text with variables). TLS settings (# @insecure) and proxies (CONNECTforwss://) as for HTTPS. Pings are answered, fragmented messages joined; no compression extension.- The response view lists every message with a direction arrow and its time (live while connected), the close code and reason, and a Transcript view. A refused upgrade (e.g.
401) is shown as a normal HTTP response with its body. - Checks:
messages= messages received (messages.length,messages[-1].data.type),events= all messages both ways (eventissent,messageorbinary), and$.xreads the last JSON message received. - CLI:
plainwire runsends WebSocket requests too; the result line reads1 sent, 2 received (done). - Editor:
WEBSOCKETin the method list, a hint in the Body tab, syntax highlighting forWEBSOCKET/WSand===lines. Copy as Code explains that it covers HTTP requests only.
Guide: https://janwan2003.github.io/vscode-api-client/websocket-client-vscode.html
Install: download plainwire-0.12.0.vsix and run Extensions: Install from VSIX… (VS Code, Cursor, Windsurf, VSCodium). CLI: plainwire.mjs (Node 20+) or npm install -g the tgz.