File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/content/docs/browser-rendering/rest-api Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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
1919curl -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
2828import Cloudflare from " cloudflare" ;
2929
3030const 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
3534const 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
3939console .log (content );
You can’t perform that action at this time.
0 commit comments