public string Get() { System.Web.HttpContext.Current.Items.Add("aa", "bb"); var client = new ValuesAPIClient(); ResponseModel r = null; //r = client.InvokeAsync<ResponseModel, ResponseModel>("api/values/post", new ResponseModel() { }).Result; r = client.Get2(Request.GetOwinEnvironment()).Result; var dd = Request.GetOwinEnvironment(); //System.Web.HttpContext.Current.GetOwinContext(); //return new ResponseModel<User>() { Data = new User { Name = "ResponseModel-Get" } }; return("gg"); }
public async Task <string> Get2() { var client = new ValuesAPIClient(); ResponseModel r = null; r = await client.InvokeAsync <ResponseModel, ResponseModel>("api/values/post", new ResponseModel() { }); r = await client.Get2(Request.GetOwinEnvironment()); //System.Web.HttpContext.Current.GetOwinContext(); //return new ResponseModel<User>() { Data = new User { Name = "ResponseModel-Get" } }; return("gg"); }
public async Task<string> Get2() { var client = new ValuesAPIClient(); ResponseModel r = null; r = await client.InvokeAsync<ResponseModel, ResponseModel>("api/values/post", new ResponseModel() { }); r = await client.Get2(Request.GetOwinEnvironment()); //System.Web.HttpContext.Current.GetOwinContext(); //return new ResponseModel<User>() { Data = new User { Name = "ResponseModel-Get" } }; return "gg"; }
public string Get() { System.Web.HttpContext.Current.Items.Add("aa", "bb"); var client = new ValuesAPIClient(); ResponseModel r = null; //r = client.InvokeAsync<ResponseModel, ResponseModel>("api/values/post", new ResponseModel() { }).Result; r = client.Get2(Request.GetOwinEnvironment()).Result; var dd = Request.GetOwinEnvironment(); //System.Web.HttpContext.Current.GetOwinContext(); //return new ResponseModel<User>() { Data = new User { Name = "ResponseModel-Get" } }; return "gg"; }