Download ZIP Archive
Download a ZIP archive containing multiple files. Extract and verify the contents.
🔗 Endpoint
GET /api/v1/files/download?format=zipOpen in browser ↗💡 Tips
- ✓Check Content-Type is application/zip
- ✓ZIP files start with PK (0x504B)
- ✓Use yauzl or adm-zip library to extract
- ✓Verify expected files are in the archive
💻 Code Example
// Playwright: Download and verify ZIP
const response = await request.get('/api/v1/files/download?format=zip');
expect(response.headers()['content-type']).toBe('application/zip');
const buffer = await response.body();
// Check ZIP magic bytes (PK)
expect(buffer[0]).toBe(0x50); // P
expect(buffer[1]).toBe(0x4B); // K
// For extraction, use a ZIP library
// const zip = new AdmZip(buffer);
// const entries = zip.getEntries();
// expect(entries.map(e => e.entryName)).toContain('users.csv');🖥️ curl Command
curl -O "https://api.qa-practice.dev/api/v1/files/download?format=zip"