Open wopietrz opened 1 year ago
@wopietrz ApiClient.cs is code genned.
You might want to look at updating:
https://github.com/CyberSource/cybersource-rest-client-dotnetstandard/blob/master/cybersource-rest-client-netstandard/cybersource-rest-client-netstandard/generator/cybersource-csharp-template/ApiClient.mustache
Thanks for reply. It is a change proposal. I can have a look at *.mustache file but want to be sure if the code chage is acceptable for you.
Each time
CallAuthenticationHeaders
method is called a new instance ofRestClient
is created and initialized withmerchantConfig.HostName
. That makes it impossilbe to setRestClient
baseAddress with values different than apitest.cybersource.com or cybersoure.com. Also there should be a possibility to override some of authentication headers like Host to specify custom hostname and and port number of the server to which the request is being sent. That would allow to call Cybersource API via cloud based API management platforms e.g. Azure Api Managment