Add support for programmatically setting headers