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()); } }
public abstract void UpdateServerData(ICouchdbServer Server);
} //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); }
public AWebRequestHelper(ICouchdbServer Server) { this._server = Server; }