<PackageReference Include="Refit" Version="16.1.0" />

Refit.HttpHeaderApplier

static class HttpHeaderApplier
Applies a sanitized header name and value to an HttpRequestMessage, choosing the request or content header collection and optionally validating the value. Shared by the source-generated request runtime and the reflection request builder so both paths behave identically.