remove cookie option, and add support for handling headers