如何在剧作家驱动程序中发出 POST 请求? (蟒蛇)

问题描述 投票:0回答:2

我想知道是否可以使用 playwright 的 python 版本在 playwright chrome/firefox 驱动程序中发布请求:https://playwright.dev/python/docs/api/class-playwright


如有任何帮助,我们将不胜感激,提前谢谢您

python python-requests playwright
2个回答
1
投票

您可以使用 Playwright APIRequestContext 功能。

response = await api_request_context.post(...)

0
投票

还有

Page.request.post
如果您已经有页面对象,这可能比创建上下文更方便。

© www.soinside.com 2019 - 2024. All rights reserved.