## Key improvements:
**Auto-stringification and Content-Type headers:**
- safeFetch now automatically stringifies object bodies and sets Content-Type: application/json
- Smart Accept header logic: only adds Accept: application/json when parseAs: 'json'
- Reduces boilerplate and prevents header regression issues
**Enhanced type safety:**
- New SafeFetchOptions interface supports object bodies
- Cleaner API: `body: request` instead of `body: JSON.stringify(request)`
- All manual header management removed from API calls
**Fix original regression:**
- Added Accept headers to sharing.ts shortener API (was missing after jQuery migration)
- Added Accept header to libs-widget.ts external API calls
- Simplified compiler-service.ts HTTP calls
**Comprehensive tests:**
- New compiler-service-tests.ts with helper for cleaner assertions
- Updated http-utils-tests.ts to match new smart header behavior
- Enhanced _setup-dom.ts for better test environment
This resolves the Cypress CI failures caused by missing Accept headers and
significantly improves the developer experience of the HTTP utilities.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>