Skip to content

Commit cbe448e

Browse files
authored
Update content-endpoint.mdx
fix /content endpoint typescript example
1 parent cdec1f5 commit cbe448e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/docs/browser-rendering/rest-api/content-endpoint.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ The `/content` endpoint instructs the browser to navigate to a website and captu
1313

1414
<Tabs syncKey="workersExamples"> <TabItem label="curl">
1515

16-
Go to `https://example.com` and return the rendered HTML.
16+
Go to `https://developers.cloudflare.com/` and return the rendered HTML.
1717

1818
```bash
1919
curl -X 'POST' 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/content' \
2020
-H 'Content-Type: application/json' \
2121
-H 'Authorization: Bearer <apiToken>' \
22-
-d '{"url": "https://example.com"}'
22+
-d '{"url": "https://developers.cloudflare.com/"}'
2323
```
2424

2525
</TabItem> <TabItem label="TypeScript SDK">
@@ -28,12 +28,12 @@ curl -X 'POST' 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browse
2828
import Cloudflare from "cloudflare";
2929

3030
const client = new Cloudflare({
31-
apiEmail: process.env["CLOUDFLARE_EMAIL"], // This is the default and can be omitted
32-
apiKey: process.env["CLOUDFLARE_API_KEY"], // This is the default and can be omitted
31+
apiToken: "nR_paJ1qn-XDIVzbVjIG3oPDJhUgqvQ24OaoMUgh"
3332
});
3433

3534
const content = await client.browserRendering.content.create({
36-
account_id: "account_id",
35+
account_id: process.env["CLOUDFLARE_ACCOUNT_ID"],
36+
url: "https://developers.cloudflare.com/",
3737
});
3838

3939
console.log(content);

0 commit comments

Comments
 (0)