Beispiel #1
0
        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);
        }
Beispiel #2
0
 public async Task <ActionResult> Index(CustomerJoin model)
 {
     return(View("Complete", await IntitiateCustomerJoinAsync(model)));
 }