fix: Fix serialization payload in Request. Fix Docs for Post Request by Mantisus · Pull Request #683 · apify/crawlee-python
Description
An incorrect serialization for payload is happening now. payload is represented as a byte string, but bytes cannot be serialized to json. Therefore, when loading and unloading from the queue (_persist_single_request_to_storage, _json_to_request) we get strings of format “b'test'”
Also corrected the documentation, as when filling forms the data should be passed not in json format and have the appropriate header.
Issues
Testing
Updated test_request_state_serialization to also take payload into account when serializing and deserializing Request
Checklist
- CI passed