type HeaderType = { accessToken: string client: string uid: string } export class HeadersCustom { headersCustom: HeaderType | null = null constructor(private httpSource?: string) {} setHeaders({ accessToken, client, uid }: HeaderType) { this.headersCustom = { accessToken, client, uid } } getHeaders() { return this.headersCustom ? { 'access-token': this.headersCustom.accessToken, client: this.headersCustom.client, uid: this.headersCustom.uid, ...(this.httpSource ? { Httpsource: this.httpSource } : {}), } : null } clearHeaders() { this.headersCustom = null } }