Chrome webextensions: how to get content-length header using fetch api

I’m developing a chrome webextension and I’m trying to use fetch api to get content-length header using a code similar with

fetch("", {
    method: "GET"
}).then(response => console.log(response.headers.get("content-length")));

But I get a null value in console. Why?

Other info:

  • I have permission in extension manifest
  • The same code works ok in firefox version of this webextension
  • The XMLHTTPRequest variant works ok in chrome, so probably I’m missing some extra parameters to fetch function