prepare headers before sending req/resp