Hi,
Citrix NetScaler exposes its Nitro API for management through a series of Json endpoints. Although there are official packages from Citrix, they are for .NET Framework and not for .Net Core. I’m working on my own implementation, which will format all the request in the correct format before executing the requests.
I’m looking into the native HttpClient for .NET Core, but as I like the way how ServiceStack handles requests towards 3rd party APIs, that option is viable too.
However, the documentation states that for .Net Core it is better to use the HttpClient ServiceClient because of a sub-optimal implementation. Am I correct that ServiceStack.Text is still using HttpWebRequest?
https://docs.servicestack.net/csharp-client
https://github.com/ServiceStack/ServiceStack.Text/blob/master/src/ServiceStack.Text/HttpUtils.cs
So what would be the better option?
- Create the necessary DTO objects to be able to deserialize the Json-responses from the API by using the ServiceStack client.
- Use ServiceStack.Text clients anyway, referring to https://stackoverflow.com/questions/10117376/are-these-the-main-differences-between-restsharp-and-servicestacks-client-code
- Use RestSharp (referring to the Stackoverflow-link above)
Edit:
By using HttpClient, I am able to override the HttpMessageHandler to disable SSL certificate checks.
Although a bad security practice, I need to be able to disable them as many NetScaler management interfaces do not have a proper certificate attached.