bruno icon indicating copy to clipboard operation
bruno copied to clipboard

feat: add variable interpolation support for WebSocket requests

Open chirag-bruno opened this issue 1 month ago • 1 comments

Description

  • Add WebSocket body interpolation in interpolateVars function
  • Interpolate URL, headers, and all messages in request.body.ws array with full variable context
  • Refactor sendWsRequest to use main process preparation (removes duplication)
  • Add mode property to wsRequest object for proper request type detection
  • Ensure consistent variable precedence matching HTTP/gRPC requests
  • Centralise all interpolation logic in main process via prepareWsRequest

This PR addresses this JIRA ticket.

Contribution Checklist:

  • [X] The pull request only addresses one issue or adds one feature.
  • [X] The pull request does not introduce any breaking changes
  • [ ] I have added screenshots or gifs to help explain the change if applicable.
  • [X] I have read the contribution guidelines.
  • [X] Create an issue and link to the pull request.

chirag-bruno avatar Nov 11 '25 15:11 chirag-bruno

Add tests in playwright for this as well

sid-bruno avatar Nov 12 '25 06:11 sid-bruno