pub fn encode<T>(value: &T) -> Result<Vec<u8>, String>where T: Serialize,
Encode a payload for the boundary.