def handle(route: Route) -> None: response = page.request.fetch(route.request) route.fulfill( response=response, status=201, headers={"foo": "bar"}, content_type="text/plain", body="Yo, page!", )
def handle(route: Route) -> None: page.request.fetch(route.request) route.fulfill(status=201)
def handle(route: Route) -> None: response = page.request.fetch(route.request) route.fulfill(response=response, status=201, body="", headers={"content-length": "0"})
def handle_route(route: Route) -> None: response = page.request.fetch(route.request) route.fulfill(response=response)
def handler(route: Route): try: route.fulfill(response=47) except Exception: route.fallback()
def handler(route: Route, request: Request): route.fulfill(status=200, body=payload)
def handle(route: Route) -> None: response = page.request.fetch(route.request) route.fulfill(response=response, status=201, body="")
def handle_request(route: Route) -> None: request = playwright.request.new_context() response = request.get(server.PREFIX + "/simple.json") route.fulfill(response=response) request.dispose()