Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matching request data when files are provided #252

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

lundberg
Copy link
Owner

When posting data with httpx along with files, the request body gets encoded as multipart form-data. This PR adds support for matching request data even if files are included in the actual request.

As a bonus feature, the data pattern gets support for the contains lookup. The eq lookup is kept as default for now, but will probably be changed to contains in the future.

Fixes #251

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (58ad17e) to head (78d8e8a).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #252   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        21    +1     
  Lines         2759      2807   +48     
  Branches       418       423    +5     
=========================================
+ Hits          2759      2807   +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lundberg lundberg merged commit 4bc9c5d into master Mar 18, 2024
10 checks passed
@lundberg lundberg deleted the fix/form-data-with-files branch March 18, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multipart encoding in Data pattern
1 participant