DashboardcliprepareHeaders preserves SDK headers

prepareHeaders preserves SDK headers

Category: architecture
Confidence: 1.00
ID: 01a08c1d-c7b7-7e58-955e-64ef8f25b548
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 0
Source session: 1ddnFwOyKa3ijdWTY
Created: 2026-09-10 16:19:17
Updated: 2026-09-10 16:19:17

Content

Chose preserving caller headers and mutating the same Headers object across retries over rebuilding only authentication headers because SDK calls own Content-Type, and replacing them causes HTTP 415; unauthorized retry handling must also replace Authorization in place. prepareHeaders() adds only Authorization and User-Agent; apiRequestToRegion() explicitly sends JSON, while SDK and raw requests retain their own body-specific headers.

Move to: