You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 🤷🏻♂️.
The text was updated successfully, but these errors were encountered:
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"));
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.
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 🤷🏻♂️.The text was updated successfully, but these errors were encountered: