websocat icon indicating copy to clipboard operation
websocat copied to clipboard

can't parse: websocat -H 'x:y' -H 'h:i' ws://xxx

Open sunvim opened this issue 9 months ago • 1 comments

      websocat  -H 'X-User-ID: 2234' -H 'X-User-Token: 11223334455' ws://localhost:8760/ws 

error output:

Image

sunvim avatar Mar 24 '25 08:03 sunvim

In Websocat1 (stable version) you need to specify -H at the end. It interprets current command line as if there were a third header ws with value //localhost:8760/ws.

Here is fixed command line.

websocat  ws://localhost:8760/ws  -H 'X-User-ID: 2234' -H 'X-User-Token: 11223334455'

This order-dependency is fixed in Websocat4 (alpha version).

vi avatar Mar 24 '25 12:03 vi