Skip to content

Browser‑context requests #36

@nathanfallet

Description

@nathanfallet

This feature request is inspired by Pydoll, another browser automation library based on CDP.

Pydoll has this feature where you can make requests directly from the code (no need to evaluate any js code).
Here is how they introduce it in their documentation:

Make HTTP calls that inherit session, cookies and CORS from the browser.

async def main():
    async with Chrome() as browser:
        tab = await browser.start()
        await tab.go_to('https://example.com/login')
        # ... realize o login ...
        response = await tab.request.get('https://example.com/api/user/profile')
        print(response.json())
  • Shared session: browser cookies and auth automatically.
  • CORS respected: same policies as the browser.
  • Direct JSON: access response.json() effortlessly.

Having this feature would allow to make requests from Kotlin code directly, improving maintainability and testability, and avoiding issues with having to write js code.

So let's talk about it and make it real! 😄

Linked to cdpdriver/zendriver#189

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions