Skip to content

Protocols

Several implementations extend the .http format beyond standard HTTP requests.

JetBrains
WEBSOCKET ws://localhost:8080/ws

{"message": "Hello"}
===
{"message": "World"}
=== wait-for-server
httpyac
WS ws://localhost:8080/ws

{{@streaming
  async function writeMessage() {
    await sleep(1000);
    ws.send('Hello');
  }
  writeMessage();
}}

JetBrains uses the WEBSOCKET keyword:

WEBSOCKET ws://localhost:8080/ws
{"message": "Hello"}
===
{"message": "World"}
=== wait-for-server
{"message": "After server response"}

The === separator delimits multiple messages. === wait-for-server pauses until a server message is received.

httpyac uses the WS or WSS keyword with {{@streaming}} script blocks for programmatic message sending. # @keepStreaming keeps connections alive.

kulala.nvim supports WebSocket via WEBSOCKET or WS keywords.

VS Code REST Client does not support WebSocket.

JetBrains uses the GRPC keyword. Requires Protocol Buffers plugin:

GRPC localhost:8080/com.example.UserService/GetUser
{"id": "123"}

httpyac uses GRPC with proto file loading (proto < ./service.proto) or gRPC reflection (# @grpc-reflection). Supports all four RPC types (unary, server streaming, client streaming, bidirectional).

kulala.nvim supports gRPC with # @grpc-... configuration flags.

httpyac
SSE https://example.com/events

Uses SSE or EVENTSOURCE keyword. JetBrains handles SSE through stream response processing in scripts (partial support).

httpyac
MQTT tcp://broker.hivemq.com
Topic: httpyac
Hello, World

Supports publish, subscribe, QoS, retain, and authentication headers.

httpyac
AMQP amqp://guest:guest@localhost
amqp_method: publish
amqp_exchange: my_exchange
{"event": "test"}

Supports publish, consume, ack, nack, cancel, purge, declare, bind, unbind, delete operations.

Feature VS CodeJetBrainshttpyacVS 2022kulala
GraphQL via X-REQUEST-TYPE header
GraphQL via GRAPHQL keyword
GraphQL auto-detection
WebSocket JetBrains: WEBSOCKET keyword. httpyac: WS/WSS keyword.
gRPC httpyac supports all four RPC types.
Server-Sent Events JetBrains: via script processing. httpyac: SSE/EVENTSOURCE keyword.
MQTT Unique to httpyac.
AMQP/RabbitMQ Unique to httpyac.