Convert cURL CLI commands into clean, modern JavaScript Fetch (async/await) and TypeScript code snippets with custom headers and error blocks.