playwright
playwright copied to clipboard
[Feature] Expose determined mimeType
Sometimes one needs to have access to the browser determined mimeType of a response.
With CDP this is possible:
client = page.context.new_cdp_session(page)
client.send("Network.enable")
client.on("Network.responseReceived", lambda r: print(r["response"]["mimeType"]))
However, this does not work with all non-chromium browsers. It would be nice, if this information would directly be exposed by playwright.