Back to Library
API

API POST with Auth

Prompt

Generate Playwright API POST request with bearer token and validate response body and status.

Example Code

await request.post('/api/data',{ headers:{Authorization:'Bearer token'}, data:{name:'test'}});

Quick Actions

PRO TIP

Paste this prompt as a comment in your .spec.ts file and let Copilot generate the test.

Next Steps
Browse Prompts