Beispiel #1
0
 public override void UpdateServerData(ICouchdbServer Server)
 {
     //Creteate the rest clinet
     client = new RestClient(Server.GetServerURL());
     //Generate needed data for selected auth type
     if (Server.LoginType == ELoginTypes.BasicAuth)
     {
         client.Authenticator = new HttpBasicAuthenticator(Server.GetLoginData().UserName, Server.GetLoginData().Password);
     }
     else if (Server.LoginType == ELoginTypes.TokenLogin)
     {
         cookieContainer        = new CookieContainer();
         client.CookieContainer = cookieContainer;
         serverURI = new Uri(Server.GetServerURL());
     }
 }
Beispiel #2
0
 public abstract void UpdateServerData(ICouchdbServer Server);
Beispiel #3
0
        }                                                           //TODO call this if trace is true and provide running time in ms

        //Create the Middleware and pass server data to it
        public BasicWebRequestHelper(ICouchdbServer Server) : base(Server)
        {
            UpdateServerData(Server);
        }
Beispiel #4
0
 public AWebRequestHelper(ICouchdbServer Server)
 {
     this._server = Server;
 }