{% if Framework.IsAngular -%}
{%      if Framework.Angular.UseHttpClient -%}
let _headers: any = {}; if (response.headers) { for (let key of response.headers.keys()) { _headers[key] = response.headers.get(key); }}
{%      else -%}
let _headers: any = response.headers ? response.headers.toJSON() : {};
{%      endif -%}
{% elsif Framework.IsFetchOrAurelia -%}
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
{% elsif Framework.IsAxios -%}
let _headers: any = {};
if (response.headers && typeof response.headers === "object") {
    for (const k in response.headers) {
        if (response.headers.hasOwnProperty(k)) {
            _headers[k] = response.headers[k];
        }
    }
}
{%- else -%}
let _headers: any = {};
{%- endif -%}