Home

Published

- 1 min read

restclient basic auth c#

img of restclient basic auth c#

The solution for this is noted below

restclient basic auth c#

Solution

   var client = new RestClient("http://yoururl.com");
client.Authenticator = new HttpBasicAuthenticator(userName, password);

var request = new RestRequest("resource", Method.GET);
client.Execute(request);

Try other methods by searching on the site. That is if this doesn’t work