Added option for specifying headers. GitHub #374