Closed mmm286 closed 4 years ago
Currently you need to manually translate curl -b
to equivalent curl -H
, then use Websocat's -H
option.
If there is enough popular demand for this feature, I can implement a --cookie
parameter that does curl
-like mapping to -H
within Websocat (short name -b
is busy).
In short: I could use this feature. I will lok into what the -H curl equivalent means. I'm not familiar with that flag offhand, but guessing that you're pulling the cookie reference out of the dumped file and pasting it into the command line itself as a header to be passed. I can probably do that in the meantime if my guess isn't too far off.
Just to understand my use case a little better: I have to login to a piece of hardware by passing it a username and password. With curl, I'm using the -d command and some XML in quotes to do this. I use -D to save the response that includes the cookie as a file. At this point I'm logged in for as long as that cookie is good. (10 minutes maybe)
I issue all my following curl commands to this piece of hardware with the -b pointing to that cookie file and get the responses for the queries I'm trying to execute. Being able to do this interactively through websockets and being able to subscribe to a query would be very helpful. I'll check out that -H stuff. Thanks.
Hi! I'm trying to "translate" a curl request with websocat because the request connect with websocket using cookies and then I need to pass some messages. The curl sentence use option -b. Is posible to make this with websocat? Thanks!