Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions playwright/_impl/_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,14 @@ async def _inner_fetch(
) -> "APIResponse":
if self._close_reason:
raise TargetClosedError(self._close_reason)
assert (
if (
(1 if data is not None else 0)
+ (1 if form is not None else 0)
+ (1 if multipart is not None else 0)
) <= 1, "Only one of 'data', 'form' or 'multipart' can be specified"
) > 1:
raise AssertionError(
"Only one of 'data', 'form' or 'multipart' can be specified"
)
assert (
maxRedirects is None or maxRedirects >= 0
), "'max_redirects' must be greater than or equal to '0'"
Expand Down