I am trying to write a java based crawler which authenticates over https and then once authentication completes the client has to invoke an https request to upgrade the connection to websocket
Host: <host>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Sec-WebSocket-Version: 13
Origin: <host>
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: VCrrJ5AAhB2cIg/xM2dgAA==
Connection: keep-alive, Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
I am currently using org.eclipse.jetty.websocket->websocket-client. How can I issue a upgrade request similar to the above using the above library. My application has to be purely java, so I don't mind using any other alternate better java library.