pankajgwl | 2024-03-11 20:35:59 UTC | #1
Hi I need assistance, Restclient property was public in previous version of .Net PureCloudPlatform.Client.V2 sdk v169.0
but in newer version of sdk v198.1 this property is private
Can you please let me know if anyway i can assign this property from client code?
// // Summary: // Gets or sets the RestClient. // // Value: // An instance of the RestClient private RestClient RestClient { get; set; }
Dileepkaranki | 2024-03-12 14:53:23 UTC | #2
You cannot use rest client with latest versions of genesys cloud. Refer this link Genesys. NET SDK and update your code
pankajgwl | 2024-03-13 06:12:56 UTC | #3
Our organization Genesys api is behind Apigee proxy so we need to set apigee Auth token using restclient We were able to set with older version but not with newer version
Any suggestions?
Hemanth | 2024-03-13 12:10:32 UTC | #4
Hi @pankajgwl
Between the two version mentioned , there is a major RestSharp Upgrade that has been performed. and Since the RestSharp upgrade, RestClient object has become lot more light weight with most of the responsibilities transferred to RestClientOptions. You can still set the proxy via exposed ClientOptions class. Here is a blog post written as part of the upgrade few months back. (https://github.com/MyPureCloud/developer-center-blog/pull/133/files)
Here is one such sample.
`var apiClient = Configuration.Default.ApiClient; var region = PureCloudRegionHosts.eucentral1; apiClient.setBasePath(region);
var proxyName = _configuration["ProxyName"]; if (!string.IsNullOrEmpty(proxyName)) { apiClient.ClientOptions.Proxy = new WebProxy(proxyName, true); // Was apiClient.RestClient.Proxy = new WebProxy(proxyName, true); in previous versions }`
Please let me know , if you are able to leverage this and set your proxy details.
Dileepkaranki | 2024-03-13 16:20:54 UTC | #5
Refer this Genesys forum
system | 2024-04-13 16:19:51 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 25135