File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/content/docs/browser-rendering/rest-api Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,15 @@ curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-
5252import Cloudflare from " cloudflare" ;
5353
5454const client = new Cloudflare ({
55- apiEmail: process .env [" CLOUDFLARE_EMAIL" ], // This is the default and can be omitted
56- apiKey: process .env [" CLOUDFLARE_API_KEY" ], // This is the default and can be omitted
55+ apiToken: process .env [" CLOUDFLARE_API_TOKEN" ],
5756});
5857
5958const pdf = await client .browserRendering .pdf .create ({
60- account_id: " account_id" ,
59+ account_id: process .env [" CLOUDFLARE_ACCOUNT_ID" ],
60+ url: " https://example.com/" ,
61+ addStyleTag: [
62+ { content: " body { font-family: Arial; }" }
63+ ]
6164});
6265
6366console .log (pdf );
You can’t perform that action at this time.
0 commit comments