Monday 13 January 2020

Call Azure function from Javascript

 <script type="text/javascript">
        function CallAzurefunction() {
            debugger;
            var data = {
                'name': 'testazure function'
            };

            var req = new XMLHttpRequest();
            req.open("POST", "AzureFunctionUrl&name=test", true);
            req.setRequestHeader("Accept", "application/json");
            req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
            req.setRequestHeader("crossDomain", true);
            req.onreadystatechange = function () {
                if (req.readyState == 4 /* complete */) {
                    req.onreadystatechange = null;
                    if (req.status == 200) {

                        // alert("Project created");
                    } else {

                        //alert(error.message);
                    }
                }
            };
            //req.send(JSON.stringify(data));

            req.send();

        }
    </script>

No comments:

Post a Comment

Numbering Table Parent group and child group ssrs report

 Recently I have faced a scenario to numbering parent group and subgroup in the following formate 10 parentGroupRow1    10.1 childGroupRow1 ...