Exemple #1
0
        public String GetInventory(Browser browser)
        {
            //WebClient webclient = new WebClient();
            //Uri uristring = null;
            ////Please replace your webservice url here
            //uristring = new Uri("https://adiglobal.us/_vti_bin/requests.asmx/InventoryRingPuddle ");
            //httpClient.Headers["ContentType"] = "application/json";
            //httpClient.Headers["Content-Type"] = "application/json";
            ////webclient.Headers["Cookie"] = "ASP.NET_SessionId=4pxkjsbzk5agicfkkfabic55";
            //string JsonStringParams = "{'productId':'BS-BEPHOC'}";
            //webclient.UploadStringCompleted += wc_UploadStringCompleted;
            ////Post data like this
            //webclient.UploadStringAsync(uristring, "POST", JsonStringParams);

            String Url = "https://adiglobal.us/_vti_bin/requests.asmx/InventoryRingPuddle";
            NameValueCollection parameters = new NameValueCollection();
            parameters.Add("productId", "BS-BEPHOC");
            String responseJson = browser.AjaxPost(Url, parameters);
            return responseJson;
        }