docs: fix function name mismatch in python route example (#23010)
This commit is contained in:
parent
4664156511
commit
aef7a2817d
|
|
@ -264,7 +264,7 @@ page.route("**/*", route -> {
|
||||||
|
|
||||||
```python async
|
```python async
|
||||||
# Handle GET requests.
|
# Handle GET requests.
|
||||||
def handle_post(route):
|
def handle_get(route):
|
||||||
if route.request.method != "GET":
|
if route.request.method != "GET":
|
||||||
route.fallback()
|
route.fallback()
|
||||||
return
|
return
|
||||||
|
|
@ -285,7 +285,7 @@ await page.route("**/*", handle_post)
|
||||||
|
|
||||||
```python sync
|
```python sync
|
||||||
# Handle GET requests.
|
# Handle GET requests.
|
||||||
def handle_post(route):
|
def handle_get(route):
|
||||||
if route.request.method != "GET":
|
if route.request.method != "GET":
|
||||||
route.fallback()
|
route.fallback()
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue