69 / 80 · 12 Programming for QA · HTTP Fundamentals← prev⊞ allnext →☰ Read as one page
8.8Practical Exercise
- Use curl or requests to make GET, POST, PUT, and DELETE requests to a public API (e.g., JSONPlaceholder)
- Inspect response headers for each request and verify Content-Type, status codes, and any security headers
- Write a test that verifies proper 401 handling: send a request without auth, with expired auth, and with invalid auth
- Write a test that verifies proper CORS headers for a cross-origin request