Serialize command headers