Implement protocol to cowboy (for 2.0)