improve serialize method in SerializeHelper in HttpMessage