fix: Accept string payload in the Request constructor by vdusek · Pull Request #697 · apify/crawlee-python

@vdusek

  • This is a follow-up to Issues with payload in POST requests #668 (comment).
  • Let's accept payload as both str and bytes in the Request.from_url constructor.
  • The field Request.payload has a validator that accepts both. With this change, we are consistent in the from_url constructor as well.
  • We do a similar thing for the Request.headers as well.

@vdusek

@vdusek vdusek added bug

Something isn't working.

t-tooling

Issues with this label are in the ownership of the tooling team.

labels

Nov 14, 2024

janbuchar

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

github-actions[bot]

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!

@vdusek vdusek added the adhoc

Ad-hoc unplanned task added during the sprint.

label

Nov 14, 2024

Mantisus

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vdusek vdusek deleted the improve-from-url-constructor branch

November 14, 2024 17:13