コード例 #1
0
 public void SetupCommonConfiguration()
 {
     _configuration = RestConfiguration.JsonDefault();
     _configuration.WithHeader("User-Agent", "RestFluencing Sample");
     _configuration.WithBaseUrl("https://api.github.com/");
     _configuration.WithBasicAuthorization("<username>", "<password>");
 }
コード例 #2
0
        public void SetupCommonConfiguration()
        {
            _configuration = RestConfiguration.JsonDefault();
            _configuration.WithHeader("User-Agent", "RestFluencing Sample");
            _configuration.WithBaseUrl("https://api.github.com/");

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
        }
コード例 #3
0
        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);
        }
コード例 #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;
        }
コード例 #5
0
 public void SetupCommonConfiguration()
 {
     _configuration = RestConfiguration.JsonDefault();
     _configuration.WithHeader("User-Agent", "RestFluencing Sample");
     _configuration.WithBaseUrl("https://api.github.com/");
 }