Differentiate websocket vs. http the right way. Switch to string for
type enum.