From b2820fccdad76cee644420ed9e4ca03364c58a06 Mon Sep 17 00:00:00 2001 From: Yusuke Iwaki Date: Wed, 4 Jan 2023 04:05:09 +0900 Subject: [PATCH] docs(python): fix example code of Route.fetch (#19840) --- docs/src/api/class-route.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/api/class-route.md b/docs/src/api/class-route.md index 3d439336b7..f684e79436 100644 --- a/docs/src/api/class-route.md +++ b/docs/src/api/class-route.md @@ -454,7 +454,7 @@ page.route("https://dog.ceo/api/breeds/list/all", route -> { ```python async async def handle(route): - response = await route.fulfill() + response = await route.fetch() json = await response.json() json["message"]["big_red_dog"] = [] await route.fulfill(response=response, json=json) @@ -464,7 +464,7 @@ await page.route("https://dog.ceo/api/breeds/list/all", handle) ```python sync def handle(route): - response = route.fulfill() + response = route.fetch() json = response.json() json["message"]["big_red_dog"] = [] route.fulfill(response=response, json=json)