-
Notifications
You must be signed in to change notification settings - Fork 3k
capture request data with aiohttp multipart/form-data #32543
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
Merged
kristapratico
merged 4 commits into
Azure:main
from
kristapratico:aiohttp-multipart-formdata
Oct 19, 2023
Merged
capture request data with aiohttp multipart/form-data #32543
kristapratico
merged 4 commits into
Azure:main
from
kristapratico:aiohttp-multipart-formdata
Oct 19, 2023
Conversation
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
API change check API changes are not detected in this pull request. |
xiangyan99
approved these changes
Oct 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
annatisch
reviewed
Oct 18, 2023
lmazuel
approved these changes
Oct 18, 2023
core, containerregistry, and tables CI failures seem unrelated with the same tests failing on the main build. |
/check-enforcer override |
kristapratico
added a commit
that referenced
this pull request
Oct 19, 2023
This reverts commit bf0213f.
iscai-msft
added a commit
to iscai-msft/azure-sdk-for-python
that referenced
this pull request
Oct 19, 2023
…into update_package_json * 'main' of https://github.com/Azure/azure-sdk-for-python: (136 commits) Re-record (Azure#32584) Update CODEOWNERS (Azure#32583) capture request data with aiohttp multipart/form-data (Azure#32543) [Core] Create generic azure-core package: `corehttp` (Azure#32191) overwrite .amlignore file (Azure#32546) Fix Sphinx error in core (Azure#32417) skip pyright for now (Azure#32569) Fix identity-broker sdist (Azure#32568) Updates to interactions with `pyproject.toml` (Azure#32480) fix: fixing local variable's name(last_modified_exising -> last_modified_existing) typo via Cspell (Azure#32556) Update feature store related entities to use the GA version (Azure#32541) Removing unused RST files (Azure#32547) Update python version for virtualenv issues (Azure#32528) [AutoRelease] t2-keyvault-2023-10-13-36681(can only be merged by SDK owner) (Azure#32478) [Monitor Distro] Update broken link (Azure#32505) Bump python stress images and addons (Azure#32554) Bump (Azure#32552) Increment package version after release of azure-cosmos (Azure#32550) repair aggregate report pipeline (Azure#32509) update readme and samples (Azure#32548) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #32473
If both
files
anddata
are passed in the request, only what's infiles
gets added to aiohttp.FormData in the code below.data
gets dropped and is not encoded into request.azure-sdk-for-python/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py
Lines 158 to 175 in 2d0123c
For example, if I'm doing multipart/form-data with files and
data={"response_format": "srt"}
, I would expect my request body to include the response_format in the form-data like below:In the current implementation, the request.data (and in this example, response_format) is ignored. This PR captures data and includes/uncomments tests for async.