Skip to content

Commit eff3d93

Browse files
minor fixes
1 parent d567aaf commit eff3d93

File tree

1 file changed

+6
-3
lines changed
  • src/content/docs/browser-rendering/quick-actions-rest-api

1 file changed

+6
-3
lines changed

src/content/docs/browser-rendering/quick-actions-rest-api/snapshot.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ The `/snapshot` endpoint captures both the HTML content and a screenshot of the
99

1010
## Basic usage
1111

12-
1312
1. Go to `https://example.com/`.
1413
2. Inject custom JavaScript.
1514
3. Capture the rendered HTML.
1615
4. Take a screenshot.
1716

18-
1917
```bash
2018
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/snapshot' \
2119
-H 'Authorization: Bearer <apiToken>' \
@@ -42,7 +40,12 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
4240

4341
## Advanced usage
4442

45-
Sets the HTML content of the page, disables JavaScript, changes the page size (`viewport`) and waits up to `30000ms` or until the `DOMContentLoaded` event fires. Then, returns the rendered HTML content and a base-64 encoded screenshot of the page.
43+
The `html` property in the JSON payload, it sets the html to `<html><body>Advanced Snapshot</body></html>` then does the following steps:
44+
45+
1. Disable JavaScript.
46+
2. Changes the page size `(viewport)`.
47+
3. Waits up to `30000ms` or until the `DOMContentLoaded` event starts.
48+
4. Returns the rendered HTML content and a base-64 encoded screenshot of the page.
4649

4750
```bash
4851
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/snapshot' \

0 commit comments

Comments
 (0)