Open BluMichele opened 7 months ago
Also, the code will never enter the third block of if-if-add which is identical to the first.
if (!string.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("Authorization")))
if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
localVarRequestOptions.HeaderParameters.Add("Authorization",
Configuration.GetApiKeyWithPrefix("Authorization"));
Hi @BluMichele,
thank you for suggested updates and for using our library. We are planning to fully refactor this library in the next major version release your suggestions will be taken into account. We'll keep you informed.
Kind regards, Petra
Hi there,
I was working on subscriptions for which there is no API class like SendEmailApi and I noticed that the following logic si repeated multiple times in each API class
If I might, I suggest creating a new method like
AddAuthenticationHeaders
in ApiClient and calling it at the beginning of ExecAsync, you are already setting things up from configuration in that location, so why do half the job in ApiClient and half in each method of each API class, move all there 🤷🏻♂️.