Ejemplo n.º 1
0
 public IClient Create(string serverAddress, ClientFormat clientFormat, ClientCredentials clientCredentials)
 {
     var restClient = GetRestClient(serverAddress, clientFormat);
     restClient.SetCredentials(clientCredentials.Username, clientCredentials.Password);
     restClient.AlwaysSendBasicAuthHeader = true;
     return new Client(restClient);
 }
Ejemplo n.º 2
0
        public void Init()
        {
            this.clientFactory = new ClientFactory();

            var clientCredentials = new ClientCredentials("test", "test");
            this.client = this.clientFactory.Create(Platform.ServerUri, ClientFormat.Json, clientCredentials);
        }