Why does HttpRequest.headers() not allow mutating data in Puppeteer?

Puppeteer

This was fixed to prevent accidental mutations of the underlying headers. HttpRequest.headers() no longer allows mutating the returned headers object. If you need to modify headers, create a new headers object and use it when continuing the request, or apply default headers globally via setExtraHTTPHeaders.