insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Insomnia uses template URL for the request instead of the one, with the path parameter inside (Websocket).

Open jonasfroeller opened this issue 1 year ago • 2 comments

Expected Behavior

Insomnia using ws://localhost:6969/chat/w32tgse and not ws://localhost:6969/chat/:monitor_id. image

Actual Behavior

It not doing that.

Reproduction Steps

Create Websocket Request. Add a path parameter. Send the request. Be disappointed.

Is there an existing issue for this?

Additional Information

How is there no good Websocket Client? https://community.postman.com/t/websocket-and-rest-requests-in-same-collection/55471 https://github.com/postmanlabs/postman-app-support/issues/11252

Insomnia is ok, but wth is this issue.

Insomnia Version

v9.0.0

What operating system are you using?

Windows

Operating System Version

Windows 11

Installation method

.exe

Last Known Working Insomnia version

No response

jonasfroeller avatar Apr 25 '24 07:04 jonasfroeller

It seems that the bug lies in the function tryToInterpolateRequestOrShowRenderErrorModal on the file /packages/insomnia/src/utils/try-interpolate.ts. It calls getRenderContext instead of getRenderedRequestAndContext that do not replace pathParameters. Can someone point me in the right direction?

arbezerra avatar Jun 14 '24 12:06 arbezerra

I just stumbled into this bug as well. A fix would be good 🙏

botagar avatar Sep 17 '24 22:09 botagar