playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Expose determined mimeType

Open JannisBush opened this issue 3 years ago • 0 comments

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.

JannisBush avatar Sep 21 '22 11:09 JannisBush