docs: fix routing and har examples (#15162)

This commit is contained in:
Ross Wollman 2022-06-27 20:34:30 -07:00 committed by GitHub
parent 79163e802a
commit 43a621e97d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -740,7 +740,7 @@ await context.close();
```java
BrowserContext context = browser.newContext(new Browser.NewContextOptions()
.setRecordHarPath(Paths.get("example.har"))
.setRecordHarUrlFilter("**/api/**");
.setRecordHarUrlFilter("**/api/**"));
// ... Perform actions ...
@ -798,13 +798,13 @@ page.routeFromHAR(Paths.get("example.har"));
```python async
# Either use a matching response from the HAR,
# or abort the request if nothing matches.
await page.routeFromHAR("example.har")
await page.route_from_har("example.har")
```
```python sync
# Either use a matching response from the HAR,
# or abort the request if nothing matches.
page.routeFromHAR("example.har")
page.route_from_har("example.har")
```
```csharp