snapd events API

Robert Ancell robert.ancell at
Wed Aug 17 02:24:26 UTC 2016


I've been trying to access snapd events using the REST API [1] and I'm not
able to get it working.

When I do the websocket upgrade I send something like this:

GET /v2/events HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: ...
Sec-WebSocket-Version: 13

And snapd just returns:

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Wed, 17 Aug 2016 02:23:25 GMT
Content-Length: 100

Internal Server Error
websocket upgrade failed: websocket: response does not implement

Googling around it seems like the Go code needs to implement some sort of
"Hijacker" interface.

Has anyone got the events support to work? Am I doing something wrong?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Snapcraft mailing list