static async Task <HttpStatusCode> IntitiateCustomerJoinAsync(CustomerJoin customer) { HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Add(Constants.HeaderSubscriptionKeyName, Constants.HeaderSubscriptionKeyValue); HttpResponseMessage response = await client.PostAsJsonAsync(Constants.UrlJoinInitiate, customer); response.EnsureSuccessStatusCode(); // Return the URI of the created resource. return(response.StatusCode); }
public async Task <ActionResult> Index(CustomerJoin model) { return(View("Complete", await IntitiateCustomerJoinAsync(model))); }