|Subject:||Allow passing a request object to use during handshake|
|Date:||Wed, 17 Jan 2018 13:58:53 -0500|
|To:||bug-Net-Async-WebSocket [...] rt.cpan.org|
|From:||Michael McClimon <michael [...] mcclimon.org>|
In testing, I would really like to be able to pass in some cookies to use for the initial client handshake. This isn't currently possible without some hacking inside the guts of the client class, but would be possible if the client accepted a `req` key, which is implemented in the attached patch. With this patch, you can do something like the following: my $req = Protocol::WebSocket::Request->new; $req->cookies('key=val'); my $client = Net::Async::WebSocket::Client->new( ... ); $client->connect( host => $host, service => $service, req => $req, ); Thanks! Michael, with a hat tip to Matthew Horsfall (alh) -- Michael McClimon email@example.com
Message body is not shown because sender requested not to inline it.