added support for http headers in defaults hash