added the ability to set header content type externally