Example #1
0
        public string GetMethod(Server server, string resourcePath)
        {
            UriBuilder uri = new UriBuilder (server.getScheme (), server.getHostname ());
            uri.Port = server.getPort ();

            var client = new RestSharp.RestClient (uri.ToString ());
            client.Authenticator = new HttpBasicAuthenticator (server.getUser (), server.getPass ());

            var request = new RestRequest (resourcePath, Method.GET);
            var response = client.Execute (request);

            return response.Content;
        }
Example #2
0
 public string getMethod(Server server, string resourcePath)
 {
     return GetMethod (server, resourcePath);
     //			return getMethod(server.getScheme(), server.getHostname(), server.getPort(), resourcePath, server.getUser(), server.getPass());
 }