Back to Library
API

API GET Deep Validation

Prompt

Generate Playwright API test that validates status, response time, headers, and nested JSON structure.

Example Code

const res = await request.get('/api/user'); expect(res.status()).toBe(200); const body = await res.json(); expect(body.profile.email).toContain('@');

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