formats header properly on post requests