Exemple #1
0
        public HeroesFixture()
        {
            var baseUri = new Uri(System.Configuration.ConfigurationManager.AppSettings["Testing_BaseUrl"]);

            httpClient = new System.Net.Http.HttpClient();
            //httpClient.DefaultRequestHeaders
            //  .Accept
            //  .Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));

            Api = new DemoWebApi.Controllers.Client.Heroes(httpClient, baseUri);
        }
Exemple #2
0
        public HeroesFixture()
        {
            var baseUri = new Uri("http://localhost:5000/");

            httpClient = new System.Net.Http.HttpClient();
            //httpClient.DefaultRequestHeaders
            //  .Accept
            //  .Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));//.net core has different behavior as described at https://github.com/zijianhuang/webapiclientgen/issues/26

            Api = new DemoWebApi.Controllers.Client.Heroes(httpClient, baseUri);
        }
        public HeroesFixture()
        {
            var baseUri = new Uri(System.Configuration.ConfigurationManager.AppSettings["Testing_BaseUrl"]);

            httpClient = new System.Net.Http.HttpClient();
            httpClient.DefaultRequestHeaders
            .Accept
            .Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));              //.net core has different behavior as described at https://github.com/zijianhuang/webapiclientgen/issues/26

            Api = new DemoWebApi.Controllers.Client.Heroes(httpClient, baseUri);
        }
Exemple #4
0
 public HeroesFixture()
 {
     HttpClient.BaseAddress = BaseUri;
     Api = new DemoWebApi.Controllers.Client.Heroes(HttpClient);
 }
 public HeroesFixture()
 {
     Api = new DemoWebApi.Controllers.Client.Heroes(HttpClient, BaseUri);
 }