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); }
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; }
public void SetupCommonConfiguration() { _configuration = RestConfiguration.JsonDefault(); _configuration.WithHeader("User-Agent", "RestFluencing Sample"); _configuration.WithBaseUrl("https://api.github.com/"); }