Check out example codes for "restclient basic auth c#". It will help you in understanding the concepts better.

Code Example 1

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

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

Learn ReactJs, React Native from akashmittal.com