Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ApiClient basePath in API calls #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wopietrz
Copy link

@wopietrz wopietrz commented Jul 8, 2022

Each time CallAuthenticationHeaders method is called a new instance of RestClientis created and initialized with merchantConfig.HostName. That makes it impossilbe to set RestClient 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

@wrightsonm
Copy link

@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

@wopietrz
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants