Closed jolly-xw closed 2 months ago
looks expected to me, the request payload to https://o.clarity.ms/collect
can't be decoded as utf-8. You need to use post_data_buffer
instead:
So is the default decoding method for post_data UTF-8? And I cannot change its encoding method, if I encounter a decoding error, I can only switch to using post_data_buffer.
Yes. Closing by that.
Version
1.46.0
Steps to reproduce
[Problem Description]
When I visit the URL: https://trutechtools.com/ac-refrigeration-tools.html?utm_campaign=browse-abandoner-email1&utm_medium=email&utm_source=attentive&externalId=deHNX, I used
page.on("request")
to listen for requests and printrequest.post_data
as well asrequest.post_data_json
, but I encountered an error:UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
. Does Playwright only support "utf-8" decoding, or is it a misuse on my part?[Code]