Skip to content

feat: add FormData class for form and multipart requests#3060

Merged
Skn0tt merged 2 commits into
microsoft:mainfrom
dgozman:form-data
May 12, 2026
Merged

feat: add FormData class for form and multipart requests#3060
Skn0tt merged 2 commits into
microsoft:mainfrom
dgozman:form-data

Conversation

@dgozman
Copy link
Copy Markdown
Contributor

@dgozman dgozman commented Apr 30, 2026

Summary

  • New FormData class with set/append, accepted by form and multipart on APIRequestContext methods.
  • form now supports repeated keys via FormData.append.
  • multipart now supports multiple files per field and pathlib.Path values.

Depends on the upstream docs change to land first so the bundled api.json declares Python FormData.

Fixes #2834
Fixes #2784

Adds the FormData class (already in java/csharp) to support repeated keys
in `form` and multiple files per field in `multipart` for APIRequestContext.

Fixes: microsoft#2834
Fixes: microsoft#2784
# Conflicts:
#	playwright/async_api/_generated.py
#	playwright/sync_api/_generated.py
#	scripts/generate_api.py
@Skn0tt Skn0tt merged commit 18810d8 into microsoft:main May 12, 2026
35 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants