How do I translate this cURL command to RestSharp:
curl -k -d . -o SessionRequest.txt
"https://myserver.com/MyWebAPI/user?
companysn=12345&
login=MyLoginName&
password=MyPassword&
ApiKey=MyApiKey"
I tried this but it did not work (got Internal Server Error):
RestClient client = new RestClient();
client.BaseUrl = new Uri("https://myserver.com/MyWebAPI/" + "user?");
RestRequest request = new RestRequest();
request.AddQueryParameter("companysn", "12345");
request.AddQueryParameter("login", "MyLoginName");
request.AddQueryParameter("password", "MyPassword");
request.AddQueryParameter("ApiKey", "MyApiKey");
response = await client.ExecuteTaskAsync(request, new System.Threading.CancellationToken());
It seems I have to include the "-k" and the "-d ." to RestSharp but how do I do it?
Thanks