<div dir="ltr"><div><div>Hi,<br><br>I've been trying to access snapd events using the REST API [1] and I'm not able to get it working.<br><br></div>When I do the websocket upgrade I send something like this:<br><br></div><div><div>GET /v2/events HTTP/1.1<br>Host:<br>Upgrade: websocket<br>Connection: Upgrade<br>Sec-WebSocket-Key: ...<br>Sec-WebSocket-Version: 13<br><br></div><div>And snapd just returns:<br><br>HTTP/1.1 500 Internal Server Error<br>Content-Type: text/plain; charset=utf-8<br>X-Content-Type-Options: nosniff<br>Date: Wed, 17 Aug 2016 02:23:25 GMT<br>Content-Length: 100<br><br>Internal Server Error<br>websocket upgrade failed: websocket: response does not implement http.Hijacker<br><br></div><div>Googling around it seems like the Go code needs to implement some sort of "Hijacker" interface.<br><br></div><div>Has anyone got the events support to work? Am I doing something wrong?<br></div><div><br></div><div>--Robert<br><br>[1] <a href="https://github.com/snapcore/snapd/blob/master/docs/rest.md">https://github.com/snapcore/snapd/blob/master/docs/rest.md</a><br></div></div></div>