fix: Accept string payload in the Request constructor by vdusek · Pull Request #697 · apify/crawlee-python
- This is a follow-up to Issues with payload in POST requests #668 (comment).
- Let's accept
payloadas both str and bytes in theRequest.from_urlconstructor. - The field
Request.payloadhas a validator that accepts both. With this change, we are consistent in thefrom_urlconstructor as well. - We do a similar thing for the
Request.headersas well.
labels
Nov 14, 2024Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Pull Request Tookit has failed!
Pull request is neither linked to an issue or epic nor labeled as adhoc!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
vdusek
deleted the
improve-from-url-constructor
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters