Added HTTP envelope to fix #370