Ejemplo n.º 1
0
 public void SetupCommonConfiguration()
 {
     _configuration = RestConfiguration.JsonDefault();
     _configuration.WithHeader("User-Agent", "RestFluencing Sample");
     _configuration.WithBaseUrl("https://api.github.com/");
     _configuration.WithBasicAuthorization("<username>", "<password>");
 }
        public void SetupCommonConfiguration()
        {
            _configuration = RestConfiguration.JsonDefault();
            _configuration.WithHeader("User-Agent", "RestFluencing Sample");
            _configuration.WithBaseUrl("https://api.github.com/");

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
        }
        public static RestConfiguration Default()
        {
            // Setup Defaults
            var config = RestConfiguration.JsonDefault();

            config.WithBaseUrl("http://test.starnow.local/");

            // Setup Factory
            var factory = Factories.Default();

            config.ClientFactory = factory;
            return(config);
        }
Ejemplo n.º 4
0
        public void Setup()
        {
            // Setup Defaults
            var restDefaults = RestConfiguration.JsonDefault();

            restDefaults.WithBaseUrl("http://test.starnow.local/");
            _configuration = restDefaults;

            // Setup Factory
            var factory = Factories.Default();

            restDefaults.ClientFactory = factory;
            _factory = factory as TestApiFactory;
        }
Ejemplo n.º 5
0
 public void SetupCommonConfiguration()
 {
     _configuration = RestConfiguration.JsonDefault();
     _configuration.WithHeader("User-Agent", "RestFluencing Sample");
     _configuration.WithBaseUrl("https://api.github.com/");
 }