Skip to content

HTTP Request Interception #2871

@namename-123

Description

@namename-123

I'm trying the code below and it keeps giving me the following error: No module named 'blinker._saferef'
How can I fix it? Also it would be great if I could change the request's parameters/headers, like changing a certain header before continuing the request like in playwright/puppeteer.


def intercept_response(request, response):
    print(request.headers)

driver = Driver(wire=True)
try:
    driver.response_interceptor = intercept_response
    driver.get("https://wikipedia.org")
finally:
    driver.quit()```

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionSomeone is looking for answers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions