add opts.headers support