I have a WPF client using RestSharp and WEB API Service. I try to use HttpBasicAuthenticator
as follows:
RestRequest login = new RestRequest(\"/
new SimpleAuthenticator("username", username, "password", password)
did NOT work with me.
The following however worked:
var client = new RestClient("http://example.com");
client.Authenticator = new HttpBasicAuthenticator(userName, password);
var request = new RestRequest("resource", Method.GET);
client.Execute(request);